JS Coding Questions Logo
JS Coding Questions
#443💼 Interview

What are the differences between primitives and non-primitives?

Advertisement

728x90

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

| Primitives | Non-primitives |

| -------------------------- | -------------------- |

| These types are predefined | Created by developer |

| These are immutable | Mutable |

| Compare by value | Compare by reference |

| Stored in Stack | Stored in heap |

| Contain certain value | Can contain NULL too |

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 14

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
443of476
What are the differences between primitives and non-primitives? | JSCodingQuestions.com