The magic behind array length property

Developer deals with arrays every day. Being a collection, an important property to query is the number of items: Array.prototype.length. In JavaScript the length does not always indicate the number of existing elements (for sparse arrays) and modifying this property may remove elements. Let's demystify the magic behind this property. Definition The length of an array is an unsigned, 32-bit integer that is… Continue reading