how to define a empty item in a array js code example Example 1: js delete all array items A.splice(0,A.length) Example 2: how to make array empty A.length = 0