Why does "null" increase length of an array even though it represents empty value?

arrays, javascript

Solution

The value null represents the intentional absence of any object value. It is one of JavaScript's primitive values.

It is not completely absent, that is intentional absence, which means that someone wants a null value at the position and use/update it later.

`null` have a unique meaning

https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/null

Problem

When "null" is included in the items in an array it counts in the length of the array. But "null" should mean no value. Then why does it happen? ``` var myArray = ["pizza", "burger", null]; var test = function (input) { return input.length; }; document.write(test(myArray)); ```

Original source