Length computation object javaScript

By Object.keys () Gets an object that can be composed of properties enumerated array, and acquires the object through the longitudinal length

let a={
    a1:1,
    a2:2,
    a3:3
}
console.log(Object.keys(a).length) //3

Guess you like

Origin www.cnblogs.com/peilin-liang/p/12059060.html