what does "-[1, ]" mean in " if(!-[1, ] && !window.XMLHttpRequest)"?

javascript

Solution

It's a hack to detect old Internet Explorer. `-[1,]` is `-1` in modern browsers (so `false` with `!`) but `NaN` in old IE (`true` negated). The first version to return correct result is IE9.

Problem

I find the code below , but I can't understand this. ``` if (!-[1, ] && !window.XMLHttpRequest) { document.execCommand("BackgroundImageCache", false, true); } ``` What does `if(!-[1,])` mean ? Thanks

Original source