---
title: "Discussion on \"Data-Types in JavaScript (Primitive and Reference) with Examples\" | Hashnode"
description: "Discussion on \"Data-Types in JavaScript (Primitive and Reference) with Examples\". Data types are of 2 types-\n\nPrimitive data-type\nReference data-type\n\nA Primitive  data-type is not an object and it has no methods. Primitive data-types are base data-type.\nA Reference  data-types are objects and arrays (technically one, since arrays..."
url: "https://hashnode.com/posts/data-types-in-javascript-primitive-and-reference-with-examples/6117c002f6ebde51f64fa84c"
---

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

Discussion

# [Data-Types in JavaScript (Primitive and Reference) with Examples](https://codewithkrishna.hashnode.dev/data-types-in-javascript-primitive-and-reference-with-examples?utm_source=hashnode&utm_medium=feed)

Data types are of 2 types- Primitive data-type Reference data-type A Primitive data-type is not an object and it has no methods. Primitive data-types are base data-type. A Reference data-types are objects and arrays (technically one, since arrays...

Aug 14, 2021 · 2 min read · codewithkrishna.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Krishna Gupta](https://hashnode.com/@Krishnaa1006)

@Krishnaa1006 · India

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

Front end web Developer and Designer from India

A Self-taught Front-end web-developer/designer

## Responses 2

Markdown supported · ⌘↵ to post

[Pranav Krishna](https://hashnode.com/@ppranav06)

[Aug 14, 2021](https://hashnode.com/posts/data-types-in-javascript-primitive-and-reference-with-examples/6117c002f6ebde51f64fa84c/comment/6117e67be9f08a51fd85ff4e)

That was a great explanation, Krishna! You don't mess up with introductions (like me) 😅 and directly start with the content. Great 👏👏👏

[Krishna Gupta](https://hashnode.com/@Krishnaa1006)

[Aug 14, 2021](https://hashnode.com/posts/data-types-in-javascript-primitive-and-reference-with-examples/6117c002f6ebde51f64fa84c/comment/6117e67be9f08a51fd85ff4e#reply-6117ed34e9f08a51fd860033)

Thanks Pranav for the feedback 🙂

[Faheem Khan](https://hashnode.com/@FaheemKhancodes)

[Aug 14, 2021](https://hashnode.com/posts/data-types-in-javascript-primitive-and-reference-with-examples/6117c002f6ebde51f64fa84c/comment/6117d7bcf6ebde51f64faa9b)

Nice explanation. Well done.

[Krishna Gupta](https://hashnode.com/@Krishnaa1006)

[Aug 14, 2021](https://hashnode.com/posts/data-types-in-javascript-primitive-and-reference-with-examples/6117c002f6ebde51f64fa84c/comment/6117d7bcf6ebde51f64faa9b#reply-6117dfeff6ebde51f64fab55)

Thanks bro 🙌
