generate functionFri, 21 Jul 2023

Actividades de arrays: 1. Dados un array de 10 números, informar cuantos de ellos son positivos.

function positive(arr) { return arr.filter(num => num > 0).length; } positive([-1, -3, -2, -3, -4, -5, -6, 1, 2, 0]); // 2

Javascript
Generate More

Want to kickstart your project?Use the new AI Studio to create your code