JS
challenger
Home
JavaScript Basics
variables
Accessing a variable (2)
Accessing a variable (2)
This exercise is very similar to the previous one. We declare a variable called
num
, assign it a value of 5, and try to log it. But again, we introduced a small mistake.Fix the code and run it.
reset
console.log(num); const num = 5;
JavaScript
Run Code
Console