How to determine what type of property has object

Hello,

I would ask how to determine what kind of type has an object?
As example if I have object

let obj = {
   a: 1,
  b:  [1,2,3],
  c: "String" 
}

How I can to check that b property is array?

think you are looking for this info or this one

1 Like

With Arrays, you’ll have to do it explicitly with instanceof.

> obj.b instanceof Array
// true

> obj.c instanceof Array
// false

1 Like