Predict Type Annotation Output
Predict Output Beginner
Question
What does this code print to the console?
Code
let message: string = "Hello";
message = message + " World";
console.log(message);
Hint
String concatenation works the same as in JavaScript.
Explanation
Type annotations are erased at runtime — this is pure JavaScript. The variable message starts as "Hello", then " World" is appended, producing "Hello World". The : string annotation has no runtime effect.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.