DEV Community

Discussion on: JavaScript Jungle: Curious case of sparse array in JS

Collapse
 
thejsdeveloper profile image
Vikas yadav • Edited

Thank you for reading. 😊 I am not sure about exact reason to name it like this. I guess because arrays are supposed to be contiguous and sparse means scattered that's why they are called sparse.

To answer your second question. Empty is not a data type. And this hole is represented as empty in chrome browser. I think safari has different way to show this.

Collapse
 
ranemihir profile image
Mihir Rane

Oh I see. Thanks for your help! :)