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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started