how to set empty array in jquery code example Example 1: how to make array empty A.length = 0 Example 2: clear arrays in jquery arr.splice(0, arr.length)