Discussion

Ask HN: What should an undefined variable evaluate to?

I think most (all?) compiled languages evaluate to a compilation error.

As for NodeJS, I thought it would evaluate to `undefined`, but it seems to consistently throw a `ReferenceError` for version 20.

What's the result for other languages?

1 points carlosneves 2 years ago 2 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton