Question:

When this code is executed, what will be the value of the j constant?

let i = "5"
let j = i + i

Answer:

Correct answer: "55" (a string).

Explanation: When used with strings, the + operator acts to append one string to another. In this case, it merges "5" onto "5" to make "55"


Keywords:

© 2017 QuizBucket.org