I have an arrays of integer. When I join that integer it becomes string and then I want to convert that to integer format again to perform arthemetic operation. So, I use parseInt
. Now when used parseInt
the number is changed to different number. Any idea how?
let nums = [6,1,4,5,3,9,0,1,9,5,1,8,6,7,0,5,5,4,3]
console.log(parseInt(nums.join('')))
6145390195186705000. //output
let nums = [6,1,4,5,3,9,0,1,9,5,1,8,6,7,0,5,5,4,3]
console.log(parseInt(nums.join('')))
digits.join('')