Working through some labs in my Flatiron cohort and some of these methods are starting to feel a bit more second nature:
function findMatching(drivers, str) {
const result = drivers.filter((driverName) => driverName.toLowerCase() === str.toLowerCase());
return result;
}
function fuzzyMatch(drivers, str) {
const result = drivers.filter(driverName => driverName.startsWith(str));
return result;
}
function matchName(drivers, str){
const result = drivers.filter(driverName => driverName["name"] === str)
return result;
}
Top comments (0)