Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

// Write a function that takes a number (a) as argument // Split a into its individual digits and return them in an array // Tipp: you might want to change the type of the number for the splitting

// Write a function that takes a number (a) as argument
// Split a into its individual digits and return them in an array
// Tipp: you might want to change the type of the number for the splitting
function myFunction(a){
return String(a).split("").map(Number);
}
 
PREVIOUS NEXT
Tagged: #Write #function #takes #number #argument #Split #individual #digits #return #array #change #type #number #splitting
ADD COMMENT
Topic
Name
8+8 =