DEV Community

Cover image for JavaScript is being a struggle for me as a beginner
Mikael321
Mikael321

Posted on

JavaScript is being a struggle for me as a beginner

I am studying JavaScript functional programming right now, but I’m practicing HTML and CSS skills.I’ve been doing all JavaScript challenges on Freecodecamp, to honest I am struggling in my JavaScript challenges. Could you give some tips for me improve in JavaScript. HTML and CSS was quite easy but JS is a bit tougher.

Top comments (5)

Collapse
 
jwp profile image
John Peters

That's why Crockford had to write
"Javascript , the good parts".

It's much better today than it was, but still is a problematic language to learn, filled with traps and requires time well spent to get comfortable.

Collapse
 
mistval profile image
Randall

Learning your first programming language is hard, and will take a lot of time. So don't feel discouraged. It's hard for everyone.

Here are some tips:

  1. Keep putting in the time. This is the most important part of learning anything. Time = improvement. Even if you aren't learning as efficiently as you could be, every line of code you write will make you better. So don't waste too much time looking for shortcuts when you could be practicing writing code instead. I cannot stress this enough. Keep writing code and you WILL get good.
  2. Learn how to use a debugger and step through code. I think most programmers learn to use a debugger way too late. Stepping through the code helps you think like a machine. Check out this video: youtube.com/watch?v=H0XScE08hy8
  3. Similar to the above, learn how to use the JavaScript console in your browser to immediately evaluate JavaScript code and see the result. This helps you experiment quickly. For example hit ctrl + shift + i, enter Math.floor(11.123), and hit enter. You can see with your own eyes what the Math.floor() function does!
Collapse
 
coderx16 profile image
CoderX16

Make sure you practice what you've learnt soon after learning.
Codecademy is a good tool for learning JS, they even give you challenges as you learn, at the end of the day its how much practice and time you put in.

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwihkMWXk773AhU5R_EDHeWDCQEQFnoECAYQAQ&url=https%3A%2F%2Fwww.codecademy.com%2Flearn%2Fintroduction-to-javascript&usg=AOvVaw3ajd77OQSBuD0WXH1n_qx7

Collapse
 
lexlohr profile image
Alex Lohr

The problem is that the solution space is much larger for JS than it is for HTML or CSS, which makes it much more difficult for a novice to get from a problem to a solution.

Collapse
 
pengeszikra profile image
Peter Vivo

Imho, try just focus on pure JS language for first, without any HTML or CSS ... that is really another story. Also skip OOP patterns, because that is don't necessary and a little bit tricky in JS.

Try solve few JS code challenge in that page: [codewars.com/]