Coercion comes in two forms in the JS language: explicit and implicit.
Here's an example of explicit coercion:
xxxxxxxxxx
15
var a = "42";
var b = Number(a);
console.log(a); // "42"
console.log(b); // 42 -- the number!
// And here's an example of implicit coercion:
var a = "42";
var b = a * 1; // "42" implicitly coerced to 42 here
console.log(a); // "42"
console.log(b); // 42 -- the number!
OUTPUT
:001 > Cmd/Ctrl-Enter to run, Cmd/Ctrl-/ to comment