[X]

Javascript Break, Continue and With Statements - (Learning Javascript Series)

Javascript Break, Continue and With Statement

Break and continue statements are part of almost every programming language. They provides ability to stop/skip the execution in a program flow. These statements are only used inside a loop or switch statement. They are not valid outside of switch/loop statement.

Break statement is most frequently  used inside switch statement and is part of every case block. Whenever a break is encountered after a case, execution is immediately sent out of switch. Similarily when it is used inside a loop, once break is found, execution comes out of loop. Break statement says, "Exit the loop."

More...

Posts By Month