From 7b69f5f648c05c88144194f282e0b5423c804e1b Mon Sep 17 00:00:00 2001 From: Eric Leung Date: Thu, 26 Nov 2015 18:02:37 -0800 Subject: [PATCH] Fix example code on filter method to avoid confusion --- challenges/object-oriented-and-functional-programming.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/object-oriented-and-functional-programming.json b/challenges/object-oriented-and-functional-programming.json index 4dac5b7ca99..907035e02ca 100644 --- a/challenges/object-oriented-and-functional-programming.json +++ b/challenges/object-oriented-and-functional-programming.json @@ -322,10 +322,10 @@ "The filter method is used to iterate through an array and filter out elements where a given condition is not true.", "filter is passed a callback function which takes the current value (we've called that val) as an argument.", "Any array element for which the callback returns true will be kept and elements that return false will be filtered out.", - "The following code is an example of using filter to remove array elements that are not even numbers:", + "The following code is an example of using filter to remove array elements that are equal to five:", "Note: We omit the second and third arguments since we only need the value", "array = array.filter(function(val) {", - "  return val % 2 === 0;", + "  return val !== 5;", "});", "Use filter to remove all elements from array that are greater than 5." ],