Empty Object and Arrow
Use this to empty object
for(const key in obj){delete obj[key];}
Use this to empty array
arr.length=0;
How to tell it's an object"
(obj.constructor===Object) ==> true
How to tell it's an array"
(arr.constructor===Array) ==> true
See console...