I am trying to check if the arguments passed to duckCount have the property 'quack' and return the number of arguments that do have it.
To do so I was trying to use the filter on the arguments array but for some reason I can't. Anyone knows why?
var notDuck = Object.create({ quack: true })
var duck = { quack: true }
duckCount(duck, notDuck) // 1
function duckCount() {
// SOLUTION GOES HERE
console.log(arguments)
return arguments.filter((argument) => argument.hasOwnProperty('quack')).length
}