I found the way to delete an item of associative array by :
delete array['knownkey'];
but what about delete the whole associative array,I mean just like empty an normal array:
the way to empty an normal array is [I found on the google]:
array = [] //or
array.length = 0
So,the associative array has the way to empty or remove the all items at once ….
Should set
assoc_arrayto an empty object (aka associative array in JavaScript).Thanks to garbage collection, there is no real need to empty an existing object. You just go get a new one.