← All freeCodeCamp videos

Array vs object gotcha in JavaScript

13,241 views 83 likes 2025-12-14 0:17 Watch on YouTube ↗ freeCodeCamp ↗
FrontendJavaScript

Chapters

No chapter markers in this video's description.

Show the creator's full description
Surprise! Arrays are actually objects in JavaScript. That's why typeof [ ] returns 'object'. Always use Array.isArray to properly check if something's an array. Don't trust typeof alone!

Description and video by freeCodeCamp.org. This page is an independent companion view; the video is embedded from YouTube.