DEV Community

Discussion on: Functional Programming in JavaScript? Yes, Please.

Collapse
 
beecallpaw profile image
Becalpa Thapa

//this code doesn't work
let cats = animals.filter(function(animal) {
return animal.species === β€˜cats’;
});
// this does
let cats = animals.filter(function(animal) {
return animal.species === 'cat';
});

Collapse
 
tiffany profile image
tiff

Yeah I see that. Thanks.