Interview Question: Explain the differences of const and Object.freeze() in JavaScript?

Today I have a job interview and was asked a question that caused my mind to … well echo the sounds of silence. It is a simple one in retrospect.

Explain the differences of const and Object.freeze()?

--

--

--

Full Stack Software Engineer (MERN) and a MS CS in Cybersecurity Engineering.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

7 Patterns to launch Polymer dialogs

Ansible Bootcamp Course from Zero to Hero

OCR using Microsoft Cognitive Services (Vision API ) in Xamarin forms

BootstrapVue — Lazy Load Images and Input Groups

Develop your application faster & smarter with Data Binding — Binding Adapters — Part 5

WordPress CMS for Mobile Apps (Ionic + Firebase) — Part 1/4

Weird Parts of JavaScript — Equality

File upload through fetch in Deno

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Zac Smith

Zac Smith

Full Stack Software Engineer (MERN) and a MS CS in Cybersecurity Engineering.

More from Medium

Design a stack with a min() function in Javascript

How does lazy loading work?

closure with code that adds click event that appends script pointing to the chunk to the dom

Introduce yourself properly

JavaScript Simplified — Data Types