-1
I am trying to do an exercise where I have that shows the values of 5 numbers that can be positive or negative but only the negative numbers of the array will be shown and also inform how many negative numbers there are. I tried the following code:
function numeros5(n1, n2, n3 ,n4, n5){
let ray = [n1,n2,n3,n4,n5]
let negativo = Number < 0
return ray.filter(negativo)
}
console.log(numeros5(-5,-2, 4,-3, 6))