| technology | JavaScript | |||||
|---|---|---|---|---|---|---|
| domain | frontend | |||||
| level | Senior/Architect | |||||
| version | ES6-ES2024 | |||||
| tags |
|
|||||
| ai_role | Senior JavaScript Performance Expert | |||||
| last_updated | 2026-03-22 |
Please refer to the specialized guides for detailed best practices:
Note
Context: An example of a common JavaScript pitfall.
var name = "Alice";Using var leads to unpredictable scoping issues and hoisting bugs.
const name = "Alice";Strictly use const and let to ensure block scoping and predictability.
For further reading, please refer to the following specialized guides: