Mas stesti, to jsem taky potreboval takze tu to mas (nedelal jsem to ja )
Kód:
var symbols = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");

function num2num(num) {
  base = symbols.length;
  octal = new Array();
  i = 0;          // init counter
  while(num >= base) {
    tmp = Math.floor(num/base);
    octal[i] = num - tmp * base;
    num = tmp; 
    i++;          // increment counter
  }
  octal[i] = num; // the reminder smaller than base
  rval = "";      // preparing the return value
  for(n = i; n >= 0; n--) rval += symbols[octal[n]];
  return rval; 
}
Pokud to potrbujes prevest ze stringu tak to volas nejak takhle:
Kód:
x=num2num(parseInt(y));