Learning javascript

I am comfortable with html/css and bootstrap. but i cant get a hold of javascript. I learned c and c++ recently and their structure and syntax are quite easier to understand for me. the rules are easy to follow. I cant see logic in javascript and cant move forward with the basic algorithm challenges even if i have done them in c/c++.

1 Like


I am also having kind of the same problem with JS.

Did you tried W3 Schools examples?

They are kind of working for me and I also follow this beginner JS challenges:

Set a time to do it once a day.


Just be patient, you will understand with time, what you need is laf Learn apply Fail, then learn from your mistakes and applied them and fail again and continue till you understand perfectly, you need extra tutorial dont just rely on freecodecamps javascript tutorials, you can try some youtube javascript tutorials or you could learn by following walkthroughs on how the algorithms are solved, i had a really hard time finishing them also but later on i was surprised by how i didnt understand them before, i also know c and c++ and i think JS is easier, just keep on trying, pushing through, you will get it, i believe you can.


What seems to be the problem?? In terms of programming (algorithms wise) there shouldn’t be much of a different from c. Programming languages all share common structure like variables, loops, arrays, and such. If you know it already, learning the syntax to do the exact same job should be easier.

Biggest difference is that there is no real data type rules to follow like int, double, float, etc. Everything just seems to be able to drop inside a variable.

Also, JavaScript works a long side with html. Probably this is where you get confuse? Since c/c++ require you to program everything from start to finish.

JavaScript can also accomplish that, but it wouldn’t be as web friendly and also hard maintain by other developers.

Back to the question, what exactly are you having problems with?

I was fine with the basics but I got stuck in the oops part. The concepts are same but the whole thing is different. For example the use of classes as function and concept of constructors and functions are changed. I specifically froze at the condensing an array part.

The concept of object in JavaScript is very different from actual OOP. There isn’t really a set structure that is easily identifiable as object.

The whole idea of using function as class definition is extremely bad in my opinion. But it is what it is.

Hopefully somewhere down the line they would implement actual class design like all the other oop language. Until then were stuck reading nested functions with curly braces all over the place. Lol

It takes some time to get used to, and a lot of research.

1 Like

Hmm thanks for the reply.

  1. Read this
    That will build the foundation for proceeding to step 2 where…

  2. https://github.com/getify/You-Dont-Know-JS/tree/master/this%20%26%20object%20prototypes
    …you will read this. Pay attention to details and make notes. Kyle Simpson’s books seem short but the concentration of information is enormous.

I think that these 2 books (which are fortunately available online) will help you understand everything you need about OOP implementation in Javascript.

Don’t forget about learning about what ES6 has to offer.

1 Like

Can you recommend videos? They are a lot out there.

use this course, i find the javascript section reall great for begineers,is not much but he teaches in deepth, and also you can practice some of the algorithms on coderbyte, you can also check on youtube for coding 360 or stephen mayeux they have the FCC algorithms challenges walkthrough videos, you can use that to improve your algorithms or see how they do the tough ones, learn new methods and stuffs
Hope That helps

1 Like

JS is object-oriented, but it does not actually use classes at its core. This makes it very different from every other object-oriented language you will typically run into, including c++/java/c#. If you are willing to do some reading, try YDKJ series of books. The third in the series is most relevant, but you may also want to read about scope and closures as well.

1 Like

Thank you tulikavijay, I have the same problem with javascript and although I found my forays into programming logic and C++ easier, javascript is simple but annoyingly frustrating. I think I understand why: All the lessons I have found on the internet, including FCC, teach you to memorize things to make it work, but they don’t tell you how or why it works when it comes to more complex functions. And as much as I love FCC, to be honest, some of the lessons on the javascript section don’t make any sense. For example, one of the lessons sets you up in such a way that it includes a completely useless variable. It was NOT part of the lesson, and thus confused me until I “cheated” and saw how it worked. I omitted the variable and it worked the way it was supposed to and then I understood my confusion. So the lessons aren’t perfect and every tutorial I have found online doesn’t teach the why and the how of the syntax, and it gets confusing. Especially when here they use log.console, on W3Schools they use document.getByElement and create a useless container like a “p” element (not useless if you need to write in html of course), and I simply use document.write to see my results.

Anyway, that’s my rant. I am so glad to hear other stories of people having the same kind of trouble. There is logic to javascript, no one tutorial explains it in entirety. It’s like figuring out how to manufacture a car by looking at all the assembled parts.


People have felt this way for years but I think it helps to realize that JavaScript has a really different purpose than C or C++ or any other language for that matter. It was originally never intended for doing really heavy and efficient programming, just minor scripting for animating things on a webpage. In recent years because of browsers becoming more powerful and people stripping out the core of browser engines and using them as runtime environments, JavaScript has become more of a programming language. It just helps to realize what you’re actually dealing with.

It wouldn’t be the solution to every programming problem you have, yet the ECMA standards it’s based off are improving and making it into a better language so in the future it may behave more like those two other languages.