myArray = ; // bad
That isn't the optimal way to get a fresh array; to truncate an array, and thus empty it, you should set the length property to zero:
myArray.length = 0; // good!
Setting the length equal to zero empties the existing array, not creating another array! This helps you to avoid pointer issues with arrays as well. With the new array method above:
// ... as provided by Dag in the comments A = [1,2,3,4,5] B = A A =  console.log(B) // [1,2,3,4,5]
length truncation would make both
B the original array but empty!