Switch case jumps to wrong case in javascript (how to properly use the break command)

前端 未结 4 1801
盖世英雄少女心
盖世英雄少女心 2020-12-12 05:08

My code is not so long so I am pasting all of it here.

The code is not complete but when I run it it first jumps to case \"start\" which it is supposed to, and then

4条回答
  •  一整个雨季
    2020-12-12 05:29

    The code will start running at the first matching "case", but it only stops running when it has reached a "break" or "return" statement;

提交回复
热议问题