length of an empty array code example Example 1: how to make array empty A.length = 0 Example 2: empty array length javascript empty array check javascript