Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript create a function which takes an array

function createArray(input) {
  var value = 0;
  var array = [];
 for (i=0;i<input;i++) {
  value++;
 array.push(value)
 console.log(array)
 }
}

createArray(12);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #create #function #takes #array
ADD COMMENT
Topic
Name
5+8 =