applies function to every elem list
by thewolff
JavaScript
const arr = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
const on_all = (list) => {
list.map(el => {
console.log(el*el);
})
}
on_all(arr);
by thewolff
const arr = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
const on_all = (list) => {
list.map(el => {
console.log(el*el);
})
}
on_all(arr);