Doesn’t the const key word make a variable a constant? Like: if we assign a value with const, we assign it to a constant and not to an immutable variable. I was always wondering.
That's right. When you use the const keyword javasctipt will expect that that value won't change. And in fact, will throw an error if you try to update it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Doesn’t the const key word make a variable a constant? Like: if we assign a value with const, we assign it to a constant and not to an immutable variable. I was always wondering.
That's right. When you use the const keyword javasctipt will expect that that value won't change. And in fact, will throw an error if you try to update it.