conversion-library / otherBaseToDecimal
Function: otherBaseToDecimal()
ts
function otherBaseToDecimal(str: string, base: number): number
otherBaseToDecimal
alias:
otherToTen
Parameters
• str: string
A string with conversion
• base: number
Binary string to be converted
Returns
number
Return decimal value
Example
ts
decimalToOtherBase('1010', 2) // 10