Declaring and initializing constants

suggest change

You 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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents