Higher-order function with array method
Write a
startsWith(prefix) factory and pass its result straight into .filter() to keep only the names that start with that prefix.Premium
JavaScript
Console