-2

I am trying to figure out a line of code to convert base 10 numeric inputs to base 26 and vice versa, is anyone able to give me a formula or code to follow? JavaScript please

Thanks

Nazmul Hoque
  • 761
  • 9
  • 9

2 Answers2

0

Number.toString() and parseInt() both support a radix parameter.

  • (12345).toString(26) returns "i6l".
  • parseInt('i6l', 26) returns 12345.
AKX
  • 152,115
  • 15
  • 115
  • 172
0
parseInt(string, radix)

You will get a better explanation on this link https://stackoverflow.com/a/1337428/8077687

shotgun02
  • 756
  • 4
  • 14