You are needed to finish a program that lists how many bad cookies are produced every day. A list of all the cookies produced for the day is given in an array. All that's needed is a regular expression that will make the function work correctly.
const cookies = ["bad cookie", "good cookie", "bad cookie", "good cookie", "good cookie"]
function badCookies(res) {
const REGEXP = /* YOU FILL IN */
return res.filter( x => REGEXP.test(x)).length
}
badCookies(res) // should output 2