As expected I got an error with this:
'use strict';
userName = 'Max';
console.log(userName);
but not with this:
'use strict';
name= 'Max';
console.log(name);
As I am using strict mode. I expected to get an error with both code snippets, but turns out that i didn’t with the later. So, I am thinking maybe name
is a reserved keyword of JavaScript; however, I didn’t find it listed among other.
Can someone explain why I didn’t get an error, please?