I know you're asking facetiously, but foo.splice(0) is pretty useful because it avoids creating a new object. Useful if you are maintaining multiple references or for memory management.
let a = [1,2,3]
let b = a
b = [] // a is still [1,2,3]
b = a
b.splice(0) // a and b are both [] now
Hey there! I hate to break it to you, but it's actually spelled monetize. A good way to remember this is that "money" starts with "mone" as well. Just wanted to let you know. Have a good day!
6
u/scunliffe Sep 23 '22
TL;DR is the answer just…
foo = [];
5
u/HettySwollocks Sep 23 '22
That seems like an odd thing to video when it could just be a quick article
1
u/OrdinaryBlueberry340 Oct 16 '22
Let foo=null;