Skip to main content
JavaScript Output Prediction Easy +10 XP

String Concatenation

What does this code print?

JavaScriptRead-only
console.log("Hello" + " " + "World");

What is the output?

Show answer and explanation

Answer: Hello World

The + operator concatenates strings. Spaces are preserved as literal characters.

Hint: Think about how + works with strings.

What this challenge tests

Output Prediction in JavaScript: strings, basics.

Related challenges