tostring function javascript code example Example: javascript number to string const toNumber = str => +str; // Example toNumber('42'); // 42