Skip to content

AmeerAsif777/objLength

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

objlength


You might wonder, for knowing the length of array, we can do like

const a= [1,2,3,4]
console.log(a.length); // Returns length of a

But for object, we can't do like the above way, and we have to suppose do like the below way

const a = {name: "ameer", age: 98}
Object.keys(a).length // Returns length of a

To make it easy, follow the below way

import objectLength from 'objlength';

let a = {name: "ameerr", age: 98}
console.log(objectLength(a)); //length of a

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published