I was asked to write code that helps to go from base 10 to any other base. So far I have this
var y=23 //Number in base 10 I want to convert
var x=2 //Base I want to convert to
var r=[]
if(y>=x){
r.push(y%x)
var y=(Math.floor(y/x))
}
else {
r.push(y)
}
console.log(r)
Sorry if this is to basic i need to keep it simple thanks for the help