Undefined Const Variable

Why does having a const variable undefined result in an error?

const notDefined;
const valueless;

A lot of text that you can type isn’t valid javascript, I don’t see how this is special so I wouldn’t say there’s an answer to “why”
Perhaps you might instead argue for why it would be valid or useful, especially if there’s an expectation that you would be able to do it, where does that come from? If there’s nothing to indicate that it should do something, then it’s not so strange if it doesn’t.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.