JavaScript number to text converter