The browser storage localStorage is not available. Either your browser does not support it or you have disabled it or the maximum memory size is exceeded. Without localStorage your solutions will not be stored.
Logging variables
Now let's log variables:
let scientist = 'Ken Thompson';
console.log(scientist);
The variable scientist
is logged.
The console outputs 'Ken Thompson'
.Exercise
Write a function
Example:
log
, that takes a parameter and logs this parameter.Example:
log('Ken Thompson')
should log 'Ken Thompson'
.
+ Hint
function log(value) {
...
}
+ Solution
function log(value) {
console.log(value);
}