multiple base conversion code example
Example: multiple base conversion
//Only for bases 2 through 9
function mulBase(num, base) {
var s = new Stack();
do {
s.push(num % base);
num = Math.floor(num /= base);
} while (num > 0);
let converted = "";
while (s.length() > 0) {
converted += s.pop();
}
return converted;
}