mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
bfb7d2bfbd5a8fe2906cf42a5a4a448406c741d7
JavaScript has ~sane~ fun rules around where variables can be redeclared or not, and which kinds of variables this applies to. Actually the rules are pretty straightforward: * `var` can be redeclared any number of times. * In strict mode, other declarations cannot be redeclared within the same scope. This implies that a `var` declaration cannot conflict with these other forms, which must take into account hoisting. So you can't have a `var a; let a` in the same scope, but you also can't have a `let a` at a scope and then a `var a` which will hoist to that same scope.
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%