Array vs object gotcha in JavaScript

Estimated read time 1 min read

Post Contenthttps://www.youtube.com/shorts/QgZoz4xFfLE

​ 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!   Read More freeCodeCamp.org 

#programming #freecodecamp #learn #learncode #learncoding

You May Also Like

More From Author