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

A simple and short guide to localStorage

A Better Authentication API

What is JTBD

Scalable React components architecture

The Service Locator Pattern (Bonus: Implementation of an EventBus).

deno 1.0.1 — importing server.ts — std lib versions

The WHY Behind MobX

Making a generative recreation of artwork ‘Ohne Titel’ by Ilya Chashnik in p5.js

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

Cloning of Myntra.com(Backend)

Learn TypeScript the easy way ♛ part 1

The Hidden Beauty of API Abuse

An introduction to Web Components