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)