nerdexam
CIW

1D0-635 · Question #51

Suppose you define two variables as follows: var x = 5; var y = "5"; Which statement will return the mathematical sum of these variables?

The correct answer is B. alert(x + parseInt(y)). See the full explanation below for the reasoning.

Question

Suppose you define two variables as follows:

var x = 5; var y = "5"; Which statement will return the mathematical sum of these variables?

Options

  • Aalert(x + int(y));
  • Balert(x + parseInt(y));
  • Calert(x + y);
  • Dalert((int)x + (int)y);

How the community answered

(30 responses)
  • A
    3% (1)
  • B
    80% (24)
  • C
    10% (3)
  • D
    7% (2)

Community Discussion

No community discussion yet for this question.

Full 1D0-635 Practice