If I have an array with variable length like var arr = [1,3,4,0];
, how can I concatenate all the elements to form a single number such as var number = 1340;
? This concatenated number should be able to undergo various operations. The number of elements in the array may vary.