Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 306 Bytes

check-if-an-object-is-an-array.mdx

File metadata and controls

18 lines (14 loc) · 306 Bytes
category created title updated
Validator
2020-04-19
Check if an object is an array
2021-10-13

JavaScript version

const isArray = (obj) => Array.isArray(obj);

TypeScript version

const isArray = (obj: any): boolean => Array.isArray(obj);