---
title: "Discussion on \"Is Javascript pass by value or pass by reference?\" | Hashnode"
description: "Discussion on \"Is Javascript pass by value or pass by reference?\". Before we get into whether JS is pass by value or reference, let's see what those terms mean.\nPass by value: Let's say your friend has written some lecture notes and you got a Xerox of them, whatever modifications you make in yours will now not affec..."
url: "https://hashnode.com/posts/is-javascript-pass-by-value-or-pass-by-reference/6139c4772c9ec22314f4b228"
---

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

Discussion

# [Is Javascript pass by value or pass by reference?](https://poornima-alugubelly.hashnode.dev/is-javascript-pass-by-value-or-pass-by-reference?utm_source=hashnode&utm_medium=feed)

Before we get into whether JS is pass by value or reference, let's see what those terms mean. Pass by value: Let's say your friend has written some lecture notes and you got a Xerox of them, whatever modifications you make in yours will now not affec...

Sep 9, 2021 · 3 min read · poornima-alugubelly.hashnode.dev  
Updated Sep 13, 2021  
Read the article

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

## Written by

[Poornima Alugubelly](https://hashnode.com/@poornima611)

@poornima611

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

## Responses 4

Markdown supported · ⌘↵ to post

[Mahendra Chauhan](https://hashnode.com/@mahendrachauhan)

[Sep 15, 2021](https://hashnode.com/posts/is-javascript-pass-by-value-or-pass-by-reference/6139c4772c9ec22314f4b228/comment/614170f5c5f31102b885e0c7)

This is been always a confusing topic, you made it very clear. Thanks.

[Dwaipayan Chakroborty](https://hashnode.com/@Dtech-Dbug)

[Sep 10, 2021](https://hashnode.com/posts/is-javascript-pass-by-value-or-pass-by-reference/6139c4772c9ec22314f4b228/comment/613b275a6d76811c4b93f493)

excellent elaborations

keep writing more :D

[Poornima Alugubelly](https://hashnode.com/@poornima611)

[Sep 10, 2021](https://hashnode.com/posts/is-javascript-pass-by-value-or-pass-by-reference/6139c4772c9ec22314f4b228/comment/613b275a6d76811c4b93f493#reply-613b3c6f82052051498b4d3e)

Thank u!

Yes that's the plan :)

[dineshthoota](https://hashnode.com/@boredbear)

[Sep 9, 2021](https://hashnode.com/posts/is-javascript-pass-by-value-or-pass-by-reference/6139c4772c9ec22314f4b228/comment/613a2cc6ee36661882921655)

The analogy was top notch :) loved it. Kudos.

[Poornima Alugubelly](https://hashnode.com/@poornima611)

[Sep 9, 2021](https://hashnode.com/posts/is-javascript-pass-by-value-or-pass-by-reference/6139c4772c9ec22314f4b228/comment/613a2cc6ee36661882921655#reply-613a3878ee366618829217ce)

Thank u!😄

[Tushar Tiwari](https://hashnode.com/@tushartiwari)

[Sep 9, 2021](https://hashnode.com/posts/is-javascript-pass-by-value-or-pass-by-reference/6139c4772c9ec22314f4b228/comment/613a162657537d179c914b6e)

Wow, learnt something new today 👍

[Poornima Alugubelly](https://hashnode.com/@poornima611)

[Sep 9, 2021](https://hashnode.com/posts/is-javascript-pass-by-value-or-pass-by-reference/6139c4772c9ec22314f4b228/comment/613a162657537d179c914b6e#reply-613a385fee366618829217c7)

Glad it helped! :)
