inputBaseN

Converts string, using the base specified by radix, to an integer.

inputBaseN(String, radix) → returns numeric

inputBaseN Argument Reference

String string
Required

radix string
Required

Examples sample code invoking the inputBaseN function

inputBaseN("1010",2)

Expected Result: 10

inputBaseN("3FF",16)

Expected Result: 1023

inputBaseN("125",10)

Expected Result: 125

inputBaseN(1010,2)

Expected Result: 10


Fork me on GitHub