Currently, I am utilizing the MDN guide for learning JavaScript and experimenting with examples using scratchpad.
Here's a scenario:
console.log('The value of b is ' + b);
var b;
Why does the console log display "The value of b is -1"? I would expect it to show as undefined.