The console.log() function prints messages to the console. Type console.log("Hello, JavaScript") and press Enter. You'll see your message appear.
You can log numbers, text, and calculations:
console.log(42)
console.log("Hello")
console.log(10 + 5)
This function becomes your main debugging tool. When code doesn't work as expected, add console.log() statements to see what's happening at each step.