Ways to clear an existing array A : Method 1. (this was my original answer to the question) A = [];. This code will set the variable A to a new empty array. ... <看更多>
This is the fastest way to empty an array: a = [];. This code assigned the array a to a new empty array. It works perfectly if you do not have any references to ... ... <看更多>