Array.prototype.myFilter = function(callback) {
const newArray = [];
// Only change code below this line
// Only change code above this line
return newArray;
};
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Challenge: Functional Programming - Implement the filter Method on a Prototype
please re-write the code so only the lines between the comments are changed.
Array.prototype.myFilter = function(callback) {
const newArray = [];
// Only change code below this line
// Only change code above this line
return newArray;
};
If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.