Skip to content

"Undefined can be defined" should be renamed #10

Open

Description

@MalteHei

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.

Activity

  1. njt1982 commented on Oct 5, 2021

    @njt1982
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions