Object Literals in JavaScript

These come up in interviews more than you think

Peterson C
Better Programming
Published in
3 min readJan 10, 2020

--

Photo by Arian Darvishi on Unsplash

What are Object literals in JavaScript?

More than one interviewer has asked me this question for front-end positions. If you have done any kind of JavaScript development, you have used an object literal at some point. I’ll explain and provide some sample code.

Object Literal

--

--

Husband, father, engineer, musician, and writer by luck. I write mostly about whatever comes to mind. Follow me on this crazy writing journey if you dare.