How to detect object length in es6

const myObj = {"name" : "abc", "city" : "xyz"};  

const result = Object.keys(myObj).length;

Comments

Popular posts from this blog

spread operator use in reactjs

Break loop once condition match JavaScript