JavaScript tutorial 49 – control statements in javascript




JavaScript tutorial 49 – control statements in javascript

JavaScript Control Statements:

Note: Control statements help us to get the control over flow of execution of a code.

Note: We can solve any real world problem by writing a program containing four programming language statements: sequential, conditional, control transfer and iterative statements.

0. Sequential statements: don’t break the normal flow of execution of code
Ex: variable declarations, assignment statements etc.
var a;
a=10;

3 types of control statements:
1. Conditional / selection: execute code based the result of a condition
if,
if else,
else if ladder,
switch case

2. Jumping / control transfer: make the control to jump/ transfer directly from one place to another
break,
continue,
function call,
return

3. Looping / Iterative: execute set of statements repeatedly
for,
while,
do while,
for in

=========================================

Follow the link for next video:
JavaScript tutorial 50 – if, if else | conditional statements in javascript

Follow the link for previous video:
JavaScript tutorial 48 – precedence & associativity of operators in javascript

====== JavaScript Questions & Answers ========

=========================================

Original source


One response to “JavaScript tutorial 49 – control statements in javascript”

Leave a Reply