Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Convert number to array of digits js

let number = 123456;

let numArray = number.toString().split(''); //[1,2,3,4,5,6]

for(let i = 0; i < numArray.length; i++){
      console.log(numArray[i])
	}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Convert #number #array #digits #js
ADD COMMENT
Topic
Name
1+6 =