Curriculum
Course: JavaScript Basic
Login

Curriculum

JavaScript Basic

JSHome

0/216
Text lesson

Immutable

Primitive values are immutable; they are hardcoded and cannot be changed.

For instance, if x = 3.14, you can change the value of x, but you cannot change the value of 3.14.

Value

Type

Comment

“Hello”

string

“Hello” is always “Hello”

3.14

number

3.14 is always 3.14

true

boolean

true is always true

false

boolean

false is always false

null

null (object)

null is always null

undefined

undefined

undefined is always undefined