You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Challenge Waypoint: Filter Arrays with filter has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36.
It asked me to use filter to remove all elements from array that are greater than 5. When I run test with my code, the result I got is true but it didn't let me pass.
My code:
varoldArray=[1,2,3,4,5,6,7,8,9,10];// Only change code below this line.varnewArray=oldArray.filter(function(val){returnval<5===true;});// Only change code above this line.(function(){returnnewArray;})();
The text was updated successfully, but these errors were encountered:
Challenge Waypoint: Filter Arrays with filter has an issue.
User Agent is:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
.It asked me to use filter to remove all elements from array that are greater than 5. When I run test with my code, the result I got is true but it didn't let me pass.
My code:
The text was updated successfully, but these errors were encountered: