📌  相关文章
📜  如何将多位数组转换为整数 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:41.809000             🧑  作者: Mango

代码示例1
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.