How to applies a function on each item in an array with JavaScript

1 Answer

0 votes
const arr = ['php', 'c#', 'c++', 'javascript'];

arr.forEach( s => console.log(s) );



/*
run:
      
php
c# 
c++ 
javascript
   
*/

 



answered Nov 2, 2019 by avibootz
...