Declaring and initializing constants
suggest changeYou can initialize a constant by using the const keyword.
const foo = 100;
const bar = false;
const person = { name: "John" };
const fun = function () = { /* ... */ };
const arrowFun = () => /* ... */ ;
Important
You must declare and initialize a constant in the same statement.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents