var second_massiv = [];
var a = 45, b = 79
function splitNumber(number) {
number.toString().split(").forEach(number => arr.push(number));
}
var arr = [];
var a = 45, b = 79;
splitNumber(a);
splitNumber(b);
console.log(arr); // ["4", "5", "7", "9"]
Find more questions by tags HTMLJavaScript
studied to learn js.javascript
in the end, almost learned nothing (in the scales of js)
for the front-end is more than enough, and even if you do not know the language - Durward_Osinski commented on July 9th 19 at 13:36
And to be able to collect from the individual functions and structures of language concise and working code need more practice and to think a head and/or read books. If the book is stupid - will have to think more. - Austen.Thompson53 commented on July 9th 19 at 13:39
read, remember - nothing gives as freely to apply what just remember, it will not work - Durward_Osinski commented on July 9th 19 at 13:42
I even learn.javascript.ru to the end is not read.... - Edwin.Abbo commented on July 9th 19 at 13:48