Javascript methods and arguments struggle

Hello everybody,

I am going through the intermediate algorithm scripting in the front end certificate and I find myself having difficulties implementing the existent methods for arrays and objects like filter, map. Also passing a function as an argument is confusing for me because I am used to program in Java OOP. My solutions consist of creating my own loops and comparisons and the code ends up to be way bigger. Any advice or resource where I can practice more this kind of problems. An example of an exercise is Wherefore Art Throu

Cheers everyone

I went through algorithms a few months ago when I was first learning Javascript. Like you I solved almost everything with for and while loops even when FCC recommended a map or filter or whatever.

Really, who cares? As long as your are learning how to think critically and problem solve you are already successfull. And array functions are not always the best, for and while loops offer a bit more flexibility in many situations.

That being said, you will find these javascript functions very useful one you know them. I feel that they fit into React very nicely for example. If you want to improve, just go to and read the documentation to see what javascript can offer you. If FCC is not enough problems, maybe head to HackerRank.

1 Like