Manipulating and Sorting Arrays in JavaScript

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025

Комментарии • 32

  • @jetspray3
    @jetspray3 Год назад

    I have used many channels to learn JavaScript but now I'm going to used your channel to solidify my knowledge of JavaScript before I move on to React.

  • @yunusmile
    @yunusmile 4 года назад +11

    i have watched almost 10 channels and yours is the best, i need a teacher that treats me like an idiot, giving simple examples, other youtubers act like everyone already knows codes and gives an example of a whole program wtf, thank you

  • @ProgSoundN_A-cube
    @ProgSoundN_A-cube 4 года назад +2

    i don't know why am commenting this late, but i have been watching your videos since 2 years today. and when ever i forget something or just need to refresh my mind, i turn to your channel. thanks much for the great work, simplicity in your videos makes it even more recommending to beginners

  • @rotrose7531
    @rotrose7531 4 года назад +1

    If youtube really cares web development technology, they should make your channel appear first whenever viewers search web-related things. Many care about new things and they do forget all those tricks are based upon these fundamentals. And you are the only one who can explain everything that everyone understands.

  • @anthonyfrimpong5473
    @anthonyfrimpong5473 4 года назад +1

    Just found you video after struggling on my own . Ur videos simplifies things a lot. Thank you very much for your time.

  • @ilyafredriksson
    @ilyafredriksson 3 месяца назад

    Thank you so much for sharing this knowledge!.I have used many channels to learn JavaScrip and yours are the best so far!
    after struggling on my own . Ur videos simplifies things a lot and helped me alot!!!

  • @vinodliyanage4128
    @vinodliyanage4128 4 года назад +4

    Thank you so much for sharing this knowledge with us.👍
    Small tip, if you want to add values into your list instead of removing them, you can do that with splice
    Splice(1,0,add anything)
    Use 0 for second parameter.

  • @ozzyfromspace
    @ozzyfromspace 5 лет назад +1

    splice(a,b,*(c,d,...,n)) seems much better than push, pop, shift, and unshift. It's 1 method that can behave like all 4. Simpler and more generic. Thanks Steve! 🙌🏽 The Star Wars are strong with you btw 😊

  • @bondimoni
    @bondimoni 5 лет назад +1

    Thanks Steve, I hope I can buy you a beer sometime in Amsterdam! Really useful videos you make!

  • @prabu2778
    @prabu2778 5 лет назад +2

    Sir you are good teacher!!!!

  • @mnfak4333
    @mnfak4333 3 года назад

    Watching this on March 2021 😁. Thanks for the video. It really helps as i am struggling with JS

  • @rotrose7531
    @rotrose7531 4 года назад +1

    Second round, amazing tutorials. Thank you.

  • @ProgSoundN_A-cube
    @ProgSoundN_A-cube 4 года назад +1

    I remember when i downloaded 108 videos of your course just to stay on track😎😂

  • @chesterxp508
    @chesterxp508 3 года назад

    Brilliant tutorials !!!

  • @vishalkhokar6303
    @vishalkhokar6303 5 лет назад +1

    thanks sir explanation is very good

  • @logancarvalho
    @logancarvalho 4 года назад +2

    I´d like to add something: if you want to add an item into the array using a non-existent index, you can do it using splice function too. Not conventional but...
    Ex:. Considering the array [ 'Rey', 'Kylo', 'C3PO' ], if you want to add at the end of this array you could write: characters.splice(3,1,'R2D2');
    The array, when printed on console, will look like: [ 'Rey', 'Kylo', 'C3PO' ,'R2D2']
    Is it a bug? IDK.
    Anyways, thanks for your videos, the´re great!

  • @amanagasthya
    @amanagasthya 4 года назад

    Thankyou for such an amazing tutorial

  • @TheCoffeeCreative
    @TheCoffeeCreative 3 года назад

    Well you gained a new Sub. Great help as I am learning JS

  • @nelsonjimenez7939
    @nelsonjimenez7939 5 лет назад +2

    Terrific.

  • @Manish-jt1fi
    @Manish-jt1fi 6 лет назад

    It will be better to understand and will be clean if you comment unnecessary console.log() . Overall you rocked.

  • @lenomarin3484
    @lenomarin3484 8 лет назад

    This is great! Thanks!

  • @trenthogan4212
    @trenthogan4212 6 лет назад

    Excellent!!

  • @damo190
    @damo190 3 года назад

    console.log(a2, delete a2[a2.length-1], a2);
    I am not getting the correct result here. First and last a2 in console.log results same output which is the result of after deleting an item from the array.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 года назад

      Delete is for removing properties from objects. If you want to remove items from an array then use shift, pop, slice, or splice.

    • @damo190
      @damo190 3 года назад

      @@SteveGriffith-Prof3ssorSt3v3 Sir, I used pop(). But the result is same. If I use,
      console.log(a2, a2.pop(), a2);
      I get wrong result. Here the result of both a2 are same.
      So I have to use two statements to get the correct result, just like,
      console.log(a2);
      console.log(a2.pop(), a2);

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 года назад +1

      @@damo190 oh. I see what you are saying. Yes. You should not put function calls inside the console log calls combined with other things. Console log the results of your calls.

  • @diperman
    @diperman 6 лет назад

    suppose i have an array a = [abc1, abc2 , 2 ,3 ,abc4,5,6,7,abc8,,......]
    and i want to remove items which starts with abc.. . how can this be done

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  6 лет назад +1

      I would recommend the Array filter method. It is designed to do things like that. Here's my tutorial on that - ruclips.net/video/WrB_--bVbbs/видео.html

  • @johnywhy4679
    @johnywhy4679 4 года назад

    Tip: You can search for a sequence of elements:
    characters.indexOf('Han', 'Chewie')