- 1
Fill in the blanks to declare an arrow function that takes an array and prints the odd elements.
const printOdds = (arr) { .forEach( => { if (el % 2 != 0) console.log(el); }); }
9 Respostas
+ 8
const printOdds = (arr) => {
arr.forEach(el => {
if (el % 2 != 0) console.log(el);
});
}
+ 1
=>
arr
el
0
Fill in the blanks to declare an arrow function that takes an array and prints the odd elements.
const printOdds = (arr)
{
.forEach(
=> {
if (el % 2 != 0) console.log(el);
});
}
0
please type answer anyone
0
const printOdds = (arr)
=>
{
arr
.forEach(
el
=> {
if (el % 2 != 0) console.log(el);
});
}
0
Functions in ECMAScript 6
Fill in the blanks to declare an arrow function that takes an array and prints the odd elements.
const printOdds = (arr)
{
.forEach(
=> {
if (el % 2 != 0) console.log(el);
});
}
0
=>
arr
el
0
0
Fill in the blanks to declare an arrow function that takes an array and prints the odd elements.
const printOdds = (arr)
=>
{
arr
.forEach(
el
=> {
if (el % 2 != 0) console.log(el);
});
}