Jump to content

JavaScript: Difference between revisions

No change in size ,  4 February 2021
Line 101: Line 101:
* <code>let</code> and <code>const</code> are post-ES6 ways which have block-scope.
* <code>let</code> and <code>const</code> are post-ES6 ways which have block-scope.


These days you should never use <code>var<c/ode>.   
These days you should never use <code>var</code>.   
The Google [https://google.github.io/styleguide/jsguide.html JS Style Guide] and [https://google.github.io/styleguide/tsguide.html TS Style Guide] suggest using <code>const</code> by default.
The Google [https://google.github.io/styleguide/jsguide.html JS Style Guide] and [https://google.github.io/styleguide/tsguide.html TS Style Guide] suggest using <code>const</code> by default.