Why was the name 'let' chosen for block-scoped variable declarations in JavaScript?

后端 未结 8 929
醉酒成梦
醉酒成梦 2020-12-07 06:47

I understand why var takes that name - it is variable, const - it is a constant, but what is the meaning behind the name for let, whic

8条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 07:36

    I think JavaScript's indebtedness to Scheme is obvious here. Scheme not only has let, but has let*, let*-values, let-syntax, and let-values. (See, The Scheme Programming Language, 4th Ed.).

    ((The choice adds further credence to the notion that JavaScript is Lispy, but--before we get carried away--not homoiconic.))))

提交回复
热议问题