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