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:
Suppose you define two variables as follows:
var x = 5;
var y = “5”;
Which statement will return the mathematical sum of these variables?
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: