evaluate Situation By comparing one value in the script to what you expect it might be. the result will be Boolean : true or false
##### examples: == is equal to != is not equal to === strict equal to !== strict not equal to
greater than < less than = greater than or equal to <= less than or equal to
allow you to compare the results of more than one comparision operator>
&& Logical And || Logical Or ! Logical Not
Loops check a condition. If it returns true, a code block will run. the condition will be checked again , it repeats until the condition return a false.
for (var i=0; i<10; i++>) {document.write(i);}
var i = l ;
var msg = ‘ ‘ ;
II Set counter to 1
II Message
II Store 5 times tabl e in a variable
while (i < 10) {
msg += i + ‘ x 5 = ‘ + (i * 5) + ‘
’;
i++;
document .getEl ementByid( ‘ answer’) . innerHTML = msg;
This loop will continue to runfor as long as the condition in the parentheses is true. That condition is a counter indicating that, as long as the variable i remains less than 10, the statements in the subsequent code block should run.
Thank You Sukina AbuHammad