Void data type in TypeScript
The void data type in Typescript represents the return value of functions which don’t return a value or return statement does not return anything.
The void data type in Typescript represents the return value of functions which don’t return a value or return statement does not return anything.
The Typescript Continue statement skips the current iteration immediately and continues to the next iteration of the loop. Unlike the break statement, the continue statement does not exit the loop. It only skips the current iteration.
The break statement breaks out or exits the current loop, switch statement, or a labeled block. It is a very useful statement, which helps us to exit the loop midway when a certain condition occurs. The break transfers the control to the very next statement after the loop, switch, or a labeled block.
A for loop repeats a group of statements until a specified condition evaluates to false. The for loop allows us to specify an initialization expression, condition, and final expression as part of the loop syntax.
While & Do While statements keep executing a block of statements in a loop until a given condition evaluates to false.