# Type Conversion ### String Conversion You can call the `String()` function to explicit convert a value to a string ```javascript String(false) -> "false" String(null) -> "null" ``` ### Numeric Conversion Occurs when you use math functions and expressions ```javascript console.log("6" / "2"); // Print out 3! ``` Or you can also do it more explicitly by calling the `Number()` function. However, note that any non-digit character that shows up in String will result in the conversion value `NaN` ```javascript console.log(Number("lol")); // Results in NaN ``` Here is the table of conversion for some common values passed into `Number()`
Value | Becomes |
`undefined` | `NaN` |
`null` | 0 |
`true and false` | `1` and `0` |
`string` | `Empty string is 0, then convert the string to number, if any non-digit character are present results in NaN` |