Core Code
Modern Dev Handbook
☰
JAVASCRIPT Contents
✕
Basic JavaScript
JS Tutorial
JS Syntax
JS Variables
JS Operators
JS If Conditions
JS Loops
JS Strings
JS Numbers
JS Functions
JS Objects
JS Scope
JS Dates
JS Temporal Dates
JS Arrays
JS Sets
JS Maps
JS Iterations
JS Math
JS RegExp
JS Data Types
JS Errors
JS Debugging
JS Conventions
JS References
JS ECMAScript 2026
JS Versions
JS HTML
JS HTML DOM
JS Events
JS Projects
JS Advanced
JS Functions
JS Objects
JS Classes
JS Asynchronous
JS Modules
JS Meta & Proxy
JS Typed Arrays
JS DOM Navigation
JS Windows
JS Web APIs
JS AJAX
JS JSON
JS jQuery
JS Graphics
Why JavaScript Needs Type Safety
JavaScript
→
JS Conventions
Prefer const When Possible
Use const for variables that should not change.
Preview
Code
<script> const apiUrl = "https://example.com/api"; console.log(apiUrl); </script>
More JS Conventions Examples (7)
Use CamelCase for Variables
Use let Instead of var
Use Strict Equality
Consistent Indentation
Use Descriptive Names
Use Arrow Functions
Separate Logic into Functions
← Use CamelCase for Variables
Use let Instead of var →