cast long string to number using parseInt in javascript? -


i want cast id 59aa94878d08a20758deed83 number, first tried without argument, got 59.

var x=parseint('59aa94878d08a20758deed83', 24);  console.log(x);

above won't return 59aa94878d08a20758deed83 in number?

just use correct radix. if real hexadecimal number, use radix 16, not 24...

console.log(parseint('59aa94878d08a20758deed83', 16))


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

javascript - How to bind ViewModel Store to View? -

javascript - Solution fails to pass one test with large inputs? -