Answer the question
In order to leave comments, you need to log in
Why is an array of numbers converted this way?
Why is the line let numbers = Number(arr.join('')); this is how it converts string to numbers, at the end it turns out ..000, although logically it should go ..77. I don’t understand this pattern, and the conversion works this way only with long arrays.
let array = [9, 2, 2, 3, 3, 7, 2, 0, 3, 6, 8, 5, 4, 7, 7, 5 , 6,7,7];
let string = arr.join(''); // "9223372036854775677"
let numbers = Number(arr.join('')); // 9223372036854776000
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question