javascript 'let' and 'var' in for-loops

后端 未结 2 572
天命终不由人
天命终不由人 2020-12-16 01:35

On my search for concrete numbers to back usage of the const keyword in Javascript, I stumbled upon a performance comparision between all three variable declara

2条回答
  •  再見小時候
    2020-12-16 02:09

    It's because the let keyword is somewhat new to the specification and is only applicable to the local scope. In Chrome it doesn't seem to be optimized yet, but that should only be a matter of time.

提交回复
热议问题