Suppose you define two variables as follows:

var x = 5;

var y = “5”;

Which statement will return the mathematical sum of these variables?

A.

alert(x + int(y));

B.

alert(x + parseInt(y));

C.

alert(x + y);

D.

alert((int)x + (int)y);

Explanation:

at PrepAway.com

30%

Suppose you define two variables as follows:

var x = 5;

var y = “5”;

Which statement will return the mathematical sum of these variables?

A.

alert(x + int(y));

B.

alert(x + parseInt(y));

C.

alert(x + y);

D.

alert((int)x + (int)y);

Explanation:

You must be logged in to post a comment.