diff --git a/src/chapter1/12-writing-decent-code.md b/src/chapter1/12-writing-decent-code.md index 9712287..ce4c5a5 100644 --- a/src/chapter1/12-writing-decent-code.md +++ b/src/chapter1/12-writing-decent-code.md @@ -215,7 +215,7 @@ JavaScript has drastically changed for the better in the past decade - there is For example `getTaskTitlesByStatus` could be rewritten in a functional style: ```js -function getTaskTitlesByStatus(tasks) { +function getTaskTitlesByStatus(tasks, status) { return tasks.filter((task) => task.status === status).map((task) => task.title); } ```