Javascript - number bases

Changing a number from base 10 to specified base

Enter the base you want to convert to. Then enter the decimal number to be converted.
The method uses repeated division, the first remainder is the least significant digit
up to the most significant digit