const can't reassign

JSstatementdeclarationconst ⟩ can't reassign

a const can't be reassigned. ( 👉 const can't reassign)

const name = "Frank";

name = "Suzy";            // can't reassign❗
//     ^^^^^^
// ⛔ TypeError: Assignment to constant variable.
// (it means a const doesn't have to the "ability" to do reassignment)

Last updated