Answers for "how to convert a multy digit array into a whole number"

0

how to convert a multy digit array into a whole number

var wholeNumber = 0;
var array = [ 5, 6, 2 ];
for(var dummyVariable = 0; dummyVariable < array.length-1; dummyVariable++){
	array[dummyVariable] = power(10, array.length-dummyVariable-1) * array[dummyVariable];
    //						   number, exponent
    wholeNumber+=array[dummyVariable];
}
//Written And Tested In Pre-ES6 Javascript.
Posted by: Guest on March-04-2020

Code answers related to "how to convert a multy digit array into a whole number"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language