Maximum base - 36 String base_num = " " ;
let base_num = [ ] ; while ( num > 0 ) { let dig = ( num % bases ) ; if ( dig < 10 ) base_num . push ( ( dig ) . toString ( ) ) ; else base_num . append ( ( ' ' . charCodeAt ( 0 ) + dig - 10 ) . toString ( ) ) ; num = Math . floor ( num / bases ) ; }