A few weeks ago, I started solving problems at LeetCode. Even though I've been in tech for three years, I hardly ever code in JavaScript because my...
For further actions, you may consider blocking this person and/or reporting abuse
I think you can also do something like this:
Array.prototype.filteris a function that returns a new array of items if it's callback returns true.That probably needs clarification, so here's an example:
Your solution works well too though! I hope you learned something new :)
Thanks for your suggestion. :)
As mentioned in the description it should be solved without the filter method.
I am grateful for your explanation, I am sure others will learn a lot from it.
Oh, I hadn't read the description. Now your solution makes more sense :)
How about this?
The art of filtering in JavaScript arrays :D
A practical approach to filtering in JavaScript. Let's learn together!
I'm not a fan of Leetcode, by the way. Did solve around 120 questions though :D
Hey @anmolbaranwal thank you for your response 😊
I am not quite sure how your suggestions fit instead of outer declaration* Or did I misunderstand something? 🙊
I thought you were referring to the title; that's why I proposed some alternative ones. Sorry for any confusion, I guess I misunderstood :D