const
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/const
상수 선언입니다. 읽기 전용의 참조를 생성하는데 MDN 설명을 보면 불변을 의미하는 건 아니고 해당하는 변수가 재할당이 불가능하다는 언급이 있습니다.
The const declaration creates a read-only reference to a value. It does not mean the value it holds is immutable, just that the variable identifier cannot be reassigned.
스터디에서도 비슷한 이야기가 있었죠. 예를 들어 아래 코드를 보면 const로 선언한 b나 c를 직접 변경하지는 못합니다. 변수 재할당은 안된다는 거죠. 하지만 c.k처럼 값을 변경할 수는 있습니다.
const b = 5;
const c = {k:10};
console.log(b); //5
console.log(c.k); //10
c.k = 15;
console.log(c.k); //10
b = 10; //Uncaught TypeError: Assignment to constant variable.
c = {k:15}; //Uncaught TypeError: Assignment to constant variable.