Optimal way to check if Object is Empty using Vanilla JavaScript

Is it enough to check using Object.keys?

So just using the Object.keys, it does return true when the object is empty. But what happens when we create a new object instance using these other constructors.

--

--

--

Developer with 3 yrs of industrial experience in developing scalable web applications.

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

Recommended from Medium

Trying Out Svelte For First Time

Let’s Build a Web App! Week 12 out of 30

Harnessing the Power of Integration Tests

Angular : Why you should use hidden over ngIf for showing/hiding elements

Building a GitHub-style emoji picker in Vue 2

Java Man’s Unholy Quest in the Node Land

The Day I Wrote My First npm Utility Module

Let’s Build a Web App! Week 11 out of 30

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
Abhay Jain

Abhay Jain

Developer with 3 yrs of industrial experience in developing scalable web applications.

More from Medium

What is a framework?

Special Concepts about JavaScript & MongoDB

JS-11 — JavaScript for Programmers, Chapter9, Part1

The Good HTML Component