Interview practice question
Checking whether a value is an array
Frontend Engineering · JavaScript Core · Beginner
How do you reliably check whether a value is an array?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- typeof returns "object".
- Array.isArray(value).
- instanceof Array fails across realms.
- Works for all arrays.
- Similar care for null checks.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.