Data conversion changes a value from one type to another. JavaScript performs some conversions implicitly, which can produce surprising results, so explicit conversion makes the intended operation clear. section 3.4.7
Preventing accidental concatenation
The expression 5 + 5 produces the number 10, but 5 + "5" produces the string "55". Convert deliberately with (5).toString() or String(5) when concatenating, and with Number("5") or parseInt("5") when calculating.




















