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

JavaScript Best Practices — Variables and Strings

Defining and Using React Redux mapDispatchToProps

How to use Directives in Angular

From Vue.js to Angular.js. Basic template syntax

A picture that simbolizes the transition from Vue to Angular

TDD with JavaScript Using Jest

React Context API

JavaScript Unit Test Best Practices — UI Tests

Do You Want to Become a Full-Stack Developer?

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

MCRTIP #1 / difficult about simple

What Is Event Propagation?

How to uppercase every first letter of every word in string in JavaScript

useRef vs. useState