transform array into int code example
Example 1: convert array to number
let x = [1,2,3,4,5]
let num = +x.join("")
Example 2: how to convert array to int
int i, k = 0;
for (i = 0; i < n; i++)
k = 10 * k + a[i];
let x = [1,2,3,4,5]
let num = +x.join("")
int i, k = 0;
for (i = 0; i < n; i++)
k = 10 * k + a[i];