Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript map method

function square(arr) {
       const newArr = arr.map(x => x * x );
    return newArr ;
  
  //if you find this answer is useful ,
//upvote ⇑⇑ , so can the others benefit also . @mohammad alshraideh ( ͡~ ͜ʖ ͡°)
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #JavaScript #map #method
ADD COMMENT
Topic
Name
8+7 =