What does it mean for a variable to be declared but not defined? I've noticed that this can happen in node repl and in the browser console.
When declaring a variable fails, the variable is left declared, but not defined. Attempting to redeclare the variable fails, but it also fails to define the same variable.
$ node
Welcome to Node.js v12.16.2.
Type ".help" for more information.
> let x = test;
Uncaught ReferenceError: test is not defined
> let x = 'test';
Uncaught SyntaxError: Identifier 'x' has already been declared
> x = 'test';
Uncaught ReferenceError: x is not defined
> x
Uncaught ReferenceError: x is not defined
>