JavaScript (Day 1)
JavaScript (Day 1)
Science &
Technology
www.histpk.org
A Division of Hidaya Trust, Pakistan
JAVASCRIPT!
© Copyright 2017 Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org
INTRODUCTION
• JavaScript is an interpreted programming language with object-
oriented (OO) capabilities.
== Checks if the value of two operands are equal or not, if (A == B) is not true.
yes then condition becomes true.
!= Checks if the value of two operands are equal or not, if (A != B) is true.
values are not equal then condition becomes true.
> Checks if the value of left operand is greater than the (A > B) is not true.
value of right operand, if yes then condition becomes true.
< Checks if the value of left operand is less than the value of (A < B) is true.
right operand, if yes then condition becomes true.
>= Checks if the value of left operand is greater than or equal (A >= B) is not true.
to the value of right operand, if yes then condition
becomes true.
<= Checks if the value of left operand is less than or equal to (A <= B) is true.
the value of right operand, if yes then condition becomes
true.
}
•The break statements indicate to the interpreter the end of that
particular case. If they were omitted, the interpreter would continue
executing each statement in each of the following cases.
The break Statement:
•The break statement, which was briefly introduced with the switch statement, is
used to exit a loop early, breaking out of the enclosing curly braces.
The continue Statement:
•The continue statement tells the interpreter to immediately start the next
iteration of the loop and skip remaining code block.
•When a continue statement is encountered, program flow will move to the loop
check expression immediately and if condition remain true then it start next
iteration otherwise control comes out of the loop.