โ›”const can't reassign

JS โŸฉ statement โŸฉ declaration โŸฉ 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?