Answer:
Hi!
The following Javascript statement compares if num is 2 or 5 and increment num by 1 if true.
if ( num==2 || num==5)
num = num +1;
Step-by-step explanation:
The operator == is used to compare if the operands are equal.
The operator || is OR.
- If at least one of the operands is true then return true.
- If all operands are false returns false.
if( num==2 || num==5) // if num is equal 2 or if num is equal 5
num = num +1; // adds 1 to num.