What exactly is type coercion in Javascript?
For example, on the use of == instead of ===?
==
===
var str = 'dude'; console.log(typeof str); // "string" console.log(!str); // false console.log(typeof !str); // "boolean"
Example of a variable which is initially declared as a string being coerced into boolean value with the ! operator