I've come across this javascript code in the wild and am having trouble understanding exactly what it does and how it works:
// Ensure its bool.
options.something = (!(options.something === false));
From what I can tell, options.something is just being set to the opposite of false. Is there any functional difference between the above and just doing the following instead?
options.something = true;
JSHint and JSLint appropriately give a "confusing use of '!'" warning on the original code.