This higher order function does not make sense

Well that’s it for me, 8 days, I got to this higher order function and it does not make sense. You sometimes use const and sometimes let, you don’t specify which to use. I followed the hints, it says I am wrong, I get a solution and it has what I had except I had let instead of const.

The whole excercise is done, I just wanted that step. I know it will keep getting harder so what the point?

1 Like

The point is to feed our curiosity. It’s insatiable in most people. What’s more, it’s a wellspring of human innovation from tools to toys. The only thing that stifles it is quitting.

Talking about it and asking questions is what gets all of us through the fog. If you’re confused, then that means you are learning and your brain is busy at work. Take the time out to ask questions and go over your work. Explain your own work to yourself as you review it. If there are any chinks in the armor they will surface, especially if you bring outside views into play. Explain your work to them, and see how it plays, then.

No scientist ever shied away from defeat. It’s the mistakes that give us building blocks and foundation. Go ahead and get frustrated and even feel helpless for a moment; but, when you come back down to earth, get back to work and think this stuff through. Like you say, it’s been 8 days. See that as a clear indication you were made for this stuff. Bear down.

Now then, the const vs. let question remains unanswered. It would be easier to address if there was some context, in particular the lesson itself. Please furnish us with a link.

1 Like

Thanks for the reply. I didn’t think I would get one. I have been doing Khan Computer programing for 3 years. Answering lots of questions. Some of the masters(experienced guys) started correcting me saying some things that I said could not be done, in fact could be; but they were using functions like forEach, which is not taught in Khan. He said I should visit this site.

In Khan I found vectors too confusing but was happy with the journey up to that point, I even made a game with help from the masters. All that to say my experience is limited but I have put in 3 years almost every day. I just want to keep my brain busy and I think there is only so far you can go without some practical experience. I could go back through the course and read docs and force myself to do practice. No doubt it was not the let/constant it was just the only difference I could see or understand. I just had no idea why or what we were doing it.
Are there practice challenges I could go to? Or do I just have to think them up. I assume the Pro course cost money. I am retired so I will not be making money from coding.
Again thanks mtf for responding.

1 Like

Hi @polymartin, I found this lesson confusing. A lot of people did, from what I see on the forums. I tried the practice challenges (I do have Pro) but the challenges were too hard for me, so I decided it was time to go through the lesson again. This time I’m reading the forums for each lesson, and also reading outside sources about Higher Order Functions. In some ways it seems they are very simple, but understanding the syntax isn’t clear through the lesson. Also I think the Codecademy platform has some limitations. Using const instead of let shouldn’t trigger an error, from what I can see, but the way the lesson is “graded,” it does.

Have you tried FreeCodeCamp? They may have some practice challenges you can do without paying for Pro.

In general, I think the best challenge projects are the real world ones … you could get yourself a Codepen account (or another code playground/sandbox website) and start looking at some of the Pens other people have made and try to adapt them or make your own.

Thanks Tera, glad I wasn’t the only one. Just looked at a video comparing freecodecamp and Code Academy. That does sound like it would be better for practicing. I don’t work, retired, so I just want to learn for its own sake. Without projects, like in Khan Academy, it does not have time to sink in. God I even struggled with Khan but after three years, I answering a lot on help enquiries. Somebody said I should broaden my experience.
So here I am.
Thanks again.

1 Like

You’re welcome! Good luck. It is a struggle, but it can be so rewarding when a difficult concept finally “clicks.” And helping others is the best!

For stitches and giggles, take a look at this mini project I called aOpb

They are examples of HoF that return a function to the caller.

I don’t understand these project. I open, hit run and get some code displayed. What it about?
Martin21. polymartin21.

So far this topic has been all talk simply because we have no idea which exercise it refers to. Please do us the kindness of posting a link to that page.