Question: 1. In JavaScript, after executing var z = 2; for(var i=0; i <5; i++) { z = z + 1; } then z has the

1.

In JavaScript, after executing

var z = 2; for(var i=0; i<5; i++) { z = z + 1; } 

then z has the value

Select one:

a. 7

b. 11

c. 8

d. 9

e. 6

2.

In JavaScript, after executing

var x = 10; var z = "" + x; 

then the value of z is

Select one:

a. "10"

b. this is invalid and will cause a run time error

c. "1","0"

d. ""

e. 10

3.

Consider the following JavaScript code snippet

var q = "1" + "2" + "3"; 

After this executes, what value does q have?

Select one:

a. 123

b. 6

c. 33

d. "123"

e. undefined

4.

In JavaScript, after executing var x = "2"; var y = "2"; var z = x + y; then the value of z is

Select one:

a. "22"

b. this is invalid and will cause a run time error

c. 22

d. 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!