The test is expecting rating to still be a string. Your use of map converted it to a number. Try filtering the array first and then using map to create the smaller object without changing the rating property’s type.

If you think about it, you should probably always implement filter before map, so in case the filtered array is shorter, you are not having to iterate over the full length of the array twice.

An extreme example is if the original array has one million elements, but after the filter is applied, the filtered array only has one element. Running the filter first prevents you from having to iterate over an additional 999, 999 elements.