---
title: "Comment by Dylan Dizon on \"Write JavaScript like a pro\" | Hashnode"
description: "With objects and arrays, since they are references, you can technically change their contents even if you declare them with const. Using const is just a better"
url: "https://hashnode.com/posts/write-javascript-like-a-pro/63a4e8fdc041627d5b2676b4/comment/63a9e41fb1011ed9ec6d5d1e"
---

[Discussion](https://hashnode.com/posts/write-javascript-like-a-pro/63a4e8fdc041627d5b2676b4)

Comment [Write JavaScript like a pro](https://hashnode.com/posts/write-javascript-like-a-pro/63a4e8fdc041627d5b2676b4)

[Dylan Dizon](https://hashnode.com/@dylandizon)

[Dec 26, 2022](https://hashnode.com/posts/write-javascript-like-a-pro/63a4e8fdc041627d5b2676b4/comment/63a9e41fb1011ed9ec6d5d1e)

With objects and arrays, since they are references, you can technically change their contents even if you declare them with const.

Using const is just a better practice to indicate that those objects or arrays should not be modified.

[Mads Akselsen](https://hashnode.com/@MadsAkselsen)

[Dec 29, 2022](https://hashnode.com/posts/write-javascript-like-a-pro/63a4e8fdc041627d5b2676b4/comment/63a9e41fb1011ed9ec6d5d1e#reply-63adfe210b31a238935e6c5c)

Yeah, properties on const object can be changed. It's common practice in the company im working currently.

But Object.freeze() can be used to make properties non-writeable. I think it can be used on arrays as well :-)
