Skip to content

conversion-library / binaryToDecimal

Function: binaryToDecimal()

ts
function binaryToDecimal(str: string): number

binaryToDecimal

alias:twoToTen

Parameters

str: string

Enter binary string

Returns

number

Return decimal values

Example

ts
binaryToDecimal('1010') // 10

Defined in

lib/decimal-conversion/decimalAndBinary.ts:42