check length of obj js code example

Example 1: javascript get length of object

var person={
var personSize = Object.keys(person).length; //gets number of properties (3)

Example 2: length of an object in javascript

//length of this object is 4
let object = {

//Get the keys of the object (A,B,C,D) and print how many there are
> prints: 4