-2
I need to add these numbers to get the final result that would be the conversion of binaries to decimals this all pretty much "right" even at the base of the kkkk gambiarra...
Numbers I need to add up:
This result was obtained after inserting binary numbers in my input and "treated" the values in the function below:
Inside my parole there is the call of another function and it is in it that this the problems that I want to solve:
// CONVERT TO BINARY
function convertToDecimal(value){
let valueBinary = value.split("").reverse();
valueBinary.forEach((item,index) => {
let potencia = 2 ** index;
console.log(item * potencia);
})
}
The result of this function are separate Numbers one on each line, I need to sum the values and thus get the final value that would be the conversion to Decimal.
See if that reply the help.
– Augusto Vasques