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