Skip to content

conversion-library / twoToTen

Function: twoToTen()

ts
function twoToTen(str: string): number

binaryToDecimal

别名:twoToTen

Parameters

str: string

输入二进制字符串

Returns

number

输出十进制数字

Example

ts
binaryToDecimal('1010') // 10

Defined in

lib/decimal-conversion/decimalAndBinary.ts:52