Type Conversion in Javascript
JavaScript has member functions for all objects, such as “valueOf” and “toString”. When you use literal numbers, Booleans, strings, undefined and null are different from the counterparts that you use for objects. This example shows this: There are ways that you can implicitly convert an object into a literal number, boolean or string. You can…