Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Undefined can be defined" should be renamed #10

Open
MalteHei opened this issue Oct 4, 2021 · 1 comment
Open

"Undefined can be defined" should be renamed #10

MalteHei opened this issue Oct 4, 2021 · 1 comment

Comments

@MalteHei
Copy link

MalteHei commented Oct 4, 2021

This one is kind of misleading, as var t does not actually return the value of t but rather of the whole expression.

> var t
undefined

> t == undefined
true

> t = "Defined"
'Defined'
> var t
undefined // <-- not actually the value of t
> t
'Defined' // <-- t remains defined

As var t not resetting t may still be a WTF moment for some, this post should be renamed (either var t does not reset t or the repl is intuitive for some).

Also, the linked source was talking about undefined being mutable, which it is not anymore.

@njt1982
Copy link
Contributor

njt1982 commented Oct 5, 2021

Thanks @MalteHei - I'll get this updated when I get a mo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants