Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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?

0

0.1

0.15

0.2

3.

Which of the following HTML code is to create a text area of 10 rows and 40 columns.