상수(const)란?

 

상수는 안정적이라는 뜻이다. 변하지 않는다.

상수에는 대입을 할 수 없다.

const a = 221
let b = a - 5
a = 4;
console.log(b)
//error

 

댓글

댓글을 사용할 수 없습니다.