
โกVariables
A variable is like a magic box ๐ฆ with a name on it. You put something inside and use it any time you need it!
let heroName = "Hero";
let superPower = "Super Speed";
console.log(heroName + " has " + superPower);
๐Loops
Loops let you do something OVER and OVER without writing it a million times. Push the button - watch the power multiply!
for (let i = 1; i <= 3; i++) {
console.log("๐ฅ BOOM #" + i);
}
๐ฆFunctions
A function is a magic gift box. You put something IN, the function does its trick, and a new thing comes OUT!
function shout(word) {
return word.toUpperCase() + "!!!";
}
shout("code");
๐ฎPlay!
Show off your superpowers - answer a few quick questions to earn your final star!
What does this print?
let x = 5;
console.log(x + 2);