Break out of nested for loops in JavaScript - Labels

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

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

  • @dcode-software
    @dcode-software  6 лет назад

    Shortly after making this video I realised that they are technically not "labelled blocks" but instead just "labels" that you place before a for loop. Sorry about that.
    Learn more here:
    developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label

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

      Super nice! :D
      What is a label in this case? Is it specific to for loops or it can be used for something else as well?

    • @dcode-software
      @dcode-software  6 лет назад

      You can also label blocks, but I'm pretty sure you rarely see it and it serves little to no purpose. Check out that MDN document I posted in the description

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

    nice thanks I was wondering what was happening in my nested break attemps lol

  • @МаксимПодлинный
    @МаксимПодлинный 4 года назад

    Clear explanation, thanks.

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

    Thank you so mutch

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

    if suppose after break outerloop, again i need to starts from let x = 1. what should i do??

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

    Jesus Christ can you go any faster you’re going to slow /s