typescript cliear all emenets in an arraty code example Example 1: js delete all array items A.splice(0,A.length) Example 2: js delete all array items A.length = 0