---
title: "Discussion on \"Understanding JavaScript reference versus instance\" | Hashnode"
description: "Discussion on \"Understanding JavaScript reference versus instance\". AKA Why did my entire array change values inexplicably???"
url: "https://hashnode.com/posts/understanding-javascript-reference-versus-instance/62f1cfb3c1e76d621b3f8e40"
---

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

Discussion

# [Understanding JavaScript reference versus instance](https://blog.petefowler.dev/understanding-javascript-reference-versus-instance?utm_source=hashnode&utm_medium=feed)

AKA Why did my entire array change values inexplicably???

Aug 9, 2022 · 4 min read · blog.petefowler.dev  
Updated Aug 15, 2022  
Read the article

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

## Written by

[Pete Fowler](https://hashnode.com/@pfowler)

@pfowler · Denver, CO

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

Full Stack Software Engineer | JavaScript, TypeScript, React, C# / .NET, Amazon Web Services (AWS)

Full stack software engineer building a financial data integration SaaS product. Led a complete rebuild of the team’s web app using JavaScript, TypeScript, React, C#/.NET, EntityFramework Core and SQL, with testing in Jest, React Testing Library, xUnit, and Moq. Utilized AWS services including MySQL RDS, EC2, ECS with Docker, S3, Lambda, and EventBridge. Passionate about continuous improvement, clean code, and best practices (where they exist). Dedicated rock climber and runner based in Colorado. Names variables like a first born child.

## Responses 1

Markdown supported · ⌘↵ to post

[Julio Delgado](https://hashnode.com/@Djulius)

[Aug 15, 2022](https://hashnode.com/posts/understanding-javascript-reference-versus-instance/62f1cfb3c1e76d621b3f8e40/comment/62fa4ea2fffdab933bdecc4c)

The snippet in the section `Another Solution` is missing a closing curly bracket.

[Aug 15, 2022](https://hashnode.com/posts/understanding-javascript-reference-versus-instance/62f1cfb3c1e76d621b3f8e40/comment/62fa4ea2fffdab933bdecc4c#reply-62fa4f10fffdab933bdecc7a)

Oh, and so does the snippet before that one.

[Pete Fowler](https://hashnode.com/@pfowler)

[Aug 15, 2022](https://hashnode.com/posts/understanding-javascript-reference-versus-instance/62f1cfb3c1e76d621b3f8e40/comment/62fa4ea2fffdab933bdecc4c#reply-62fa6214be14cfbd5d7c8696)

[Julio Delgado](https://hashnode.com/@Djulius) thank you. I fixed them
