JavaScript is so confusing to me

can you solve this challenge on your own without looking at the solution? https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/iterate-through-an-array-with-a-for-loop

1 Like

I wish freecodecamp had a lesson review .

you can review the lessons as often as you want by going to the curriculum and doing whatever challenge you want

3 Likes

I don’t want miss up my progress and I don’t see anything wrong with my loop

You don’t learn by people telling you what to do and then just doing it. Learning involves figuring it out on your own. Programming is not easy. There are no magic bullets that will just put all of this information and knowledge into your head and suddenly make you a great programmer. You have to start at the beginning like everyone else and work your way up. If you aren’t willing to take the time to do that then you are going to struggle.

2 Likes

I stared at the beginning “Upcher” some people need help some don’t.

We’re trying to help you. You are trying to build knowledge but your foundation is made out of quicksand.

Going back to the beginning, moving slowly, and trying to deepen your understanding will really pay off. With the difficulties you are having, we can see that you are missing some foundational knowledge that you need to understand and complete this project.

you will not mess up your progress, you can do and redo all the challenges as many times as you need

if there wasn’t anything wrong it would work (and even then it is debatable - if it works it doesn’t mean that there isn’t anything wrong)

we are trying to make so that you yourself have the tools and knowledge to figure out what’s wrong.


for(let i=0; i < operator.length; i++) {
   operator[i].addEventListener('click', performOperation, false)
	if ([i].includes("-")){
		i.slice(0, -1)&& i.pop()
	}else if 

I imagine you wanted to do stuff with the elements of the operator array (if it is an array)
then you need to use operator[i] everytime.

Instead you start using methods on [i] and then even on just i

please review on how to operate on array elements

also, the slice method returns a new array, it doesn’t change the array on which it is used.

I stopped doing that project and i’m going back to school. I didn’t know i could go back. Now where should i start.
And when I’m done i will start over. Thanks for telling me @lasjorg Its wait off my shoulders.

I just went back to my classes for JavaScript and i never did the top three classes. How does that happen?

what do you mean with “classes”?

it may be that after you did it a couple of challenges were added, or something else

I would definitely suggest doing some more 101 Javascript.

But, I didn’t mean you shouldn’t do project videos at all, unless if you don’t want to. JavaScript30 is a pretty popular project-based video series. See if you can get one video in every day, or every other day. They are pretty short.

If you have some free time and don’t know what to do, go to your favorite YouTube coding channel and pick some video that shows something you would like to learn.

Spend half the time watching and half the time typing, try not to do both too much at the same time, or you will just be doing dictation. You need to pay attention to what is shown and what you are writing. If you see something you would do differently, stop and think about how you would implement it instead. Come up with different solutions to something shown. Add a new feature, change a feature, make the project as much yours as you can.

When done, throw it to the side and use what was shown to do your own thing from scratch. You can use the code you already wrote as a reference guide.

Last I just want to reiterate that struggling with code is good, it is how you learn. Do not just stay in your comfort zone, it may feel like an easy win, but in the long run, it will not pay off.

1 Like

Basic JavaScript, ES6, and Regular Expression I didn’t finish or see. I think it happened when they updated the system.

try doing them. maybe try again also the rest.

and if you need help, the forum will still be here.

2 Likes