FrontendDeveloper.in

JavaScript question detail

What are the differences between primitives and non-primitives?

JavaScript language has both primitives and non-primitives but there are few differences between them as below,

PrimitivesNon-primitives
These types are predefinedCreated by developer
These are immutableMutable
Compare by valueCompare by reference
Stored in StackStored in heap
Contain certain valueCan contain NULL too
Back to all JavaScript questions
Get LinkedIn Premium at Rs 399