Question: 1. Which of the following JavaScript statement is to compare if num is 2 or 5, if yes, increment num by 1? if( num==2 ||
1.
Which of the following JavaScript statement is to compare if num is 2 or 5, if yes, increment num by 1?
| if( num==2 || 5) num = num +1; | ||||||||||||||||||||||||||||||||||||||
| if( num==2 || num==5) num = num +1; | ||||||||||||||||||||||||||||||||||||||
| if( num=2 || 5) num = num +1; | ||||||||||||||||||||||||||||||||||||||
| if( num==2 || num=5) num = num +1; 2. var amount = 100; var discount = 0; if(amount>50) discount = 0.1; else if( amount > 75) discount =0.15; else if( amount>100) discount =0.2; else discount =0.25; What is the value of discount?
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
