🧪 Concept:
console.log() is a way to print messages to the console — kind of like writing sticky notes to yourself while coding. It shows you what’s happening inside your program.
let name = "Jamie";
console.log(name); // JamieThis will print Jamie to the browser’s console — a space where developers can debug and check what their code is doing.
🧰 Why It Matters:
console.log() is one of your most useful tools as a beginner. It helps you see what’s going on: the value of variables, whether something ran, or what a function returned.
🎉 Quick Challenge:
Try logging three things:
console.log("Hello world!");
console.log(5 + 7);
console.log(true);Watch what shows up in your browser’s console. You’re talking directly to your code.
🧠 Fun Analogy:
console.log() is like yelling into a walkie-talkie to hear if anyone’s listening. It’s your way of asking, “Did this work?”
📚 Further Reading:
▪ MDN Docs – console.log()
▪ W3Schools – console.log().
Subscribe to my feed to follow along. I’ll keep the lessons short and sweet.
Leave a Reply