JavaScript for Beginners: forEach loop

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

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

  • @ronaldjohnson_ita
    @ronaldjohnson_ita 2 года назад +2

    Hey, I just wanted to thank you for your videos! You do such an excellent job at explaining. I especially love your videos on Google App Scripts! Keep up the good work :)

    • @saperis
      @saperis  2 года назад

      Wow, thank you! 😀

  • @bedtimehorrorstoryyoutube
    @bedtimehorrorstoryyoutube Год назад +1

    Thank you! You really helped me a lot with the forEach loop! 😀 Everything is crystal clear nevertheless some doubts remain in my mind about the "index" part of the video at 3:22.
    Does the function know we want it to give us the index of the element because the second argument is literally "index" and it's some kind of reserved word for this task by javascript.
    Or could we have used any other word like "carrot", "bike" or "green" as a second argument and it still would have give us the index of the element?
    My question may sound weird but I really need to understand this. If someone has the answer please consider sharing it with me I would be incredibly thankful😀

    • @saperis
      @saperis  Год назад +1

      You have to use the word "index". You can verify this by trying it out ourself.

  • @alwaysgratefulmixail7569
    @alwaysgratefulmixail7569 2 года назад +1

    Respect for the explanation