Object.defineProperty()

let book = {};
book.title = 'Little Women';
console.log(book);
// prints { title: 'Little Women' }

--

--

--

Software engineer writing about programming, learning, & more. Highly caffeinated. In a committed relationship with the Oxford comma.

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

Recommended from Medium

React-Redux-Final Project

localhost:8080 → https://my-app.dev | Create secure URLs for the local development environment.

Everything You Need To Know About Hoisting in JavaScript

Testing with Selenium: Covering an Enterprise Web Application

How to Properly Build Components for React or Any Other Library/Framework

React JS — Life Cycle of Components

To ; or Not to ; ? —  An Existential Crisis of Programming Identity

Night Owl’s Weekly Update [29/06/2022] 🌙 🦉

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
Elizabeth

Elizabeth

Software engineer writing about programming, learning, & more. Highly caffeinated. In a committed relationship with the Oxford comma.

More from Medium

Parcel — Quick Start a Front-end Project with Zero Configuration

The Hardship and Importance of Well-designed Front-End

Transpiler VS Compiler

Building a Flock Simulation with Javascript