https://tecadmin.net/empty-array-javascript/
How to Empty an Array in JavaScript