Controlling the for loop


#1



Every time I run it my browser freezes and I then get a message saying the script was too long and that my browser stopped responding. Your help will be greatly appreciated as I can't carry on unless I find a solution.


for (var i = 5; i < 51; i + 5) {
	console.log(i);
}


#2

It needs to be i += 5 because if not, it will create the infinite loop that you have going on. You need to make sure you're assigning i to itself plus 5, rather than just adding five.
Does this make sense?


#3

Thanks for the reply. It does make sense but at the same time it's a little bit confusing. In one of the previous loop lessons there was a line of code written similarly to what I wrote(it worked just fine) which made me think that in order for me to add 5 each time I have to do this i + 5. I'll try your way and hopefully that'll do it.


#4

It worked! Thanks Kylea.


#5

It's a shame that there isn't an option to add people nor follow them. Because I want to become a front end developer and I could do with someone with whom I can have discussions with. Once again thanks for your time.


#6

Yeah, that would be pretty cool. :slight_smile: Awesome you want to be a front end developer, I like the back end more in all honesty.

No problem, it's always refreshing helping somebody who actually tries to help themselves and is kind. :slight_smile:


#7

Yeah I really love programming and I love the fact that you can make things happen literally with words, signs and numbers anywhere you are. I wanted somewhere to start and I thought front end was a good start though I'd like to become a fullstack developer in the future.

Why do you like the back end more? just a little curious.


#8

The programming I really like is Python, Java, C, etc. I love Javascript, but I just enjoy what the purpose of python and backend languages really are. :slight_smile:


#9

Fair enough! Each to their own :slight_smile: . I actually learned Java about a year ago but then I stopped I'm not entirely sure why. I like the fact that Javascript can be used for both front end and back end. I've learned HTML & CSS(to a basic level) and as you know I'm currently learning Javascript.
What should I do once I've finished my Javascript course?


#10

If you want front end, jQuery.


#11

Thanks, jQuery is actually part of my plans but my aim is to learn as much as I can to maybe do some sort of apprenticeship or perhaps apply for junior jobs. I would like to know when I can apply for such positions.


#12

I definitely love JavaScript, so it's fantastic that it can be both front and back. One day, it would be a miracle to go to some kind of bootcamp and be a fulllstack developer, because front end isn't bad, I just wouldn't want to solely do that.
After JavaScript, if you would like to use it more for front end, AngularJS is a GREAT place to start. I also think that if you liked JavaScript, you might want to try Ruby, and then Ruby on Rails. I really love Ruby as well, and I believe that it can be both front and back end, (I may be wrong), but it's really awesome to use it with Rails.
Like @javascriptjoee said, jQuery is also awesome. I really liked doing SQL, too. There are so many great courses, so really if you want to do full stack, it would be beneficial to do any of them. I'll say one of the most unique and rewarding one's is Ruby, even though it's not my absolute favorite, (python), it's something that is based highly on the programmer themselves, and it's simple, (in my opinion), to learn.
I actually don't know any C programs, but that's next on my list. I really am trying to get more into SQL, because it's a really powerful database when combined with other languages. I did some PHP, but I got about halfway through it and it was pretty boring to me.
EDIT: Get back into learning Java! It's amazing! I use it for my AP Computer Science class, and I've learned so much. It's an extremely strong language, and in all honesty, though it's a bit clunky, it is one of my favorites.
Edit 2: I forgot to mention ReactJS as well. :slight_smile:


#13

If I'm totally honest the reason why I'm not learning back end as well is because I think it would be confusing considering the amount of different languages I'd have to learn. If I didn't think it would be confusing then believe me I'd try my best to become a full stack developer instead. What I need is basically a plan on how to get my first job or apprenticeship in this field. By that I mean what languages I need to learn and what level I need to reach in order to be good enough to get to the front door. It'd be nice if the list was numbered and also if you believe that it wouldn't confuse me then do a list which starts with front end and ends with back end or whichever way you deem best.

I also need to learn how not to forget other languages whilst learning new languages. Because I'm new to this field I don't really know how it works in terms of learning. It's funny because I speak 3 languages.


#14

I know that all entry level positions differ. When looking for one of your first jobs in this field, you really just want to get in the door of a job or internship etc. There, you'll meet people and learn new languages. You say that you love coding, the way to know forget other languages when learning a new one is to continue with the first ones! it's like with real languages, when you're learning another human language, you don't stop speaking your mother one. Codecademy is really here to provide courses that turn people on to programming. After finishing any of these, nobody will be a pro at that language, but it makes you want to do more. After starting with this website, I decided that programming was something I wanted to do in the future, so now I'm taking an AP Computer Science class. The stuff here we learn is so easy, but it teaches us the basics, and then we use it to do more awesome things.


#15

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.