How A Javascript Function Converts Binary String To Decimal Number

How A Javascript Function Converts Binary String To Decimal Number