typescript clear all objects in array code example Example: js delete all array items A.splice(0,A.length)