Accessing a variable (1)
In this simple exercise we declare a variable called num and assign it a value of 5. Then we try to log the value of the variable using the
console.log()
method.But, the console.log()
method contains a small mistake. If you try to run the code, you will see an error message.Fix the mistake and run the code again.
JavaScript
Console