Hello with the following line of code, how do I modify it and print the amount of each type of fruit using the same function?
var fruits = ["Banana", "Orange", "Apple", "Mango","Orange", "Orange",
"Apple", "Mango"];
var cant = fruits.filter(function(value) {
return value == "Orange";
})
console.log(cant.length);