Skip to content

let和const不会变量提升 #5

Open

Description

@cloudy-rain

Activity

  1. WindRunnerMax commented on May 22, 2022

    @WindRunnerMax
    Owner

    建议你去阅读英文原文,关于你这块,MDN的描述是

    The other difference between var and let is that the latter is initialized to a value only when a parser evaluates it (see below).
    

    他并没有对于变量提升的相关描述,如果你纠结于这个问题,不如去阅读 https://stackoverflow.com/questions/31219420/are-variables-declared-with-let-or-const-hoisted 的相关讨论

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions