⛔const can't reassign
JS ⟩ statement ⟩ declaration ⟩ const ⟩ can't reassign
a const can't be reassigned. ( 👉 const can't reassign❗)
replit: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
Was this helpful?