how clear an array in javascript code example
Example 1: how to clear array in javascript
A.length = 0
Example 2: javascript clear an array
let arr = [3.14, 7];
arr = [];//make sure there is no other reference
A.length = 0
let arr = [3.14, 7];
arr = [];//make sure there is no other reference