---
title: "Discussion on \"Why Primitive and Non-primitive datatypes in JavaScript works differently when we try to copy data from one variable to another?\" | Hashnode"
description: "Discussion on \"Why Primitive and Non-primitive datatypes in JavaScript works differently when we try to copy data from one variable to another?\". In JavaScript, Primitive data types are - string, number, boolean, undefined, null, symbol and non-primitive data types are - arrays and objects which are also known as Reference data types.\nLet's see how it gets stored - \nThere are basically two typ..."
url: "https://hashnode.com/posts/why-primitive-and-non-primitive-datatypes-in-javascript-works-differently-when-we-try-to-copy-data-from-one-variable-to-another/633abb8ebe2efb31727b5067"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why Primitive and Non-primitive datatypes in JavaScript works differently when we try to copy data from one variable to another?](https://pranitapatil.hashnode.dev/why-primitive-and-non-primitive-datatypes-in-javascript-works-differently-when-we-try-to-copy-data-from-one-variable-to-another?utm_source=hashnode&utm_medium=feed)

In JavaScript, Primitive data types are - string, number, boolean, undefined, null, symbol and non-primitive data types are - arrays and objects which are also known as Reference data types. Let's see how it gets stored - There are basically two typ...

Oct 3, 2022 · 3 min read · pranitapatil.hashnode.dev  
Read the article

-   [#primitive-datatypes](https://hashnode.com/tag/primitive-datatypes)
-   [#non-primitive-datatypes](https://hashnode.com/tag/non-primitive-datatypes)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#array](https://hashnode.com/tag/array)
-   [#objects](https://hashnode.com/tag/objects)

## Written by

[Pranita Patil](https://hashnode.com/@pranitakrishna)

@pranitakrishna · India

  
[View profile](https://hashnode.com/@pranitakrishna)

Software Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
