Skip to content

Commit e757a00

Browse files
authored
Merge pull request TheAlgorithms#271 from Chaitanya-Raj/patch-1
fix typo
2 parents 0e398bb + b9c6491 commit e757a00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Conversions/BinaryToDecimal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function binaryToDeicmal (binaryNumber) {
22
let decimalNumber = 0
3-
const binaryDigits = binaryNumber.split('').reverse() // Splits the bnary number in revered single digits
3+
const binaryDigits = binaryNumber.split('').reverse() // Splits the binary number into reversed single digits
44
binaryDigits.forEach((binaryDigit, index) => {
55
decimalNumber += binaryDigit * (Math.pow(2, index)) // Summation of all the decimal converted digits
66
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy