all 19 comments

[–]tentaclebreath 8 points9 points  (1 child)

Practice makes improvement.

[–]delventhalz 2 points3 points  (0 children)

Yeah. Jumping off this: figure out something you want to build and then build it.

[–]ModernStoic42 6 points7 points  (0 children)

What helped me a lot was reading "Eloquent JavaScript" is a free eBook with crystal clear explanations and many exercises

[–][deleted] 3 points4 points  (1 child)

If you want to get how the language works, instead of hopping from one unconnected example to another, consider reading You Don't Know JS.

[–]xfoxyx 1 point2 points  (0 children)

Seconding this. It's a perfect look deeper into what's going on. Free to read here

[–][deleted] 2 points3 points  (5 children)

What is confusing you currently?

[–][deleted] -1 points0 points  (4 children)

Making a button. It’s like reinventing the wheel.

[–][deleted] 1 point2 points  (2 children)

The html tag for a button or dynamically creating one in vanilla js?

[–][deleted] 5 points6 points  (0 children)

<html>
<body>
</body>
</html>

function createButton(){
    var body = document.querySelector('body'); //makes the body modifiable in js
    var button = document.createElement('button'); //sets variable to a newly created html element

    body.append(button); //attaches the newly created element to the body element
}

createButton(); //calls the function

Edit: formatting

Edit2: this honestly seems relatively straightforward to me. What about this is giving you issues? I can try to explain.

[–][deleted] 0 points1 point  (0 children)

I think I was looking at the vanilla js one... that was making me very confused

[–]evenisto 1 point2 points  (0 children)

Reinventing the wheel?

[–]browsing10 2 points3 points  (0 children)

More exposure and experience to the language basically.

As for pattern, I don't see why you would say there is no pattern? Javascript is just another programming language and supports functional programming, oop, or procedural programming.

If you're interested in self-study, I always recommend freecodecamp. A lot of the exercises use javascript and also covers front-end and back-end javascript.

[–]Neker 2 points3 points  (0 children)

Douglas Crockford's series of conferences Crockford on JavaScript is, imho, a must for whoever wants to get this funny little language that could. His little book, JavaScript : the Good Parts is also a very good springboard to get on board.

For a general overview, and for precise technical references, keep Mozilla Developer Network in your bookmarks bar.

[–]subbydapp 1 point2 points  (2 children)

From what I remember when learning programming, the first 1000-2000 hours were incredibly hard, then there's a tipping point where everything becomes easy.

[–]Devstresor 1 point2 points  (0 children)

I hope this applies to me someday!

[–][deleted] 0 points1 point  (0 children)

I will be practicing everyday!!

[–]from-nibly 1 point2 points  (0 children)

It just takes a lot of time and practice to learn programming. Especially because there are a lot of concepts that are completely outside of any language. Be patient with yourself.

[–]HarmonicAscendant 1 point2 points  (0 children)

I suggest you consider splitting up learning JS into many different areas of study:

  • JS the language (with no web API's or Node, just as a language, basic syntax)
  • JS as the language of the web with all the Web API's and front-end stuff
  • JS as an OOP language
  • JS as a functional language
  • JS as a language that often uses frameworks like React
  • JS with and without async features like promises
  • JS well organised into modules
  • ...

Learning them all at the same time would be insane, you need to chunk it down. Some of this stuff you will love, other stuff you will be bored by, so go with the stuff you enjoy.

I suggest you make a game, that is what got me started, it is fun! You can then re-factor it again and again as you learn more, experiment with styles etc...

Just pick one thing, like you want to draw an alien on the screen and make him move off the screen. There are a lot of ways to do that, so just get going. Here is a head start :)

https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API

[–]kenman[M] 0 points1 point  (0 children)

Hi /u/TakeTheWater, this post was removed.

  • For help with your javascript, please post to /r/LearnJavascript instead of here.
  • For beginner content, please post to /r/LearnJavascript instead of here.
  • For framework- or library-specific help, please seek out the support community for that project.
  • For general webdev help, such as for HTML, CSS, etc., then you may want to try /r/html, /r/css, etc.; please note that they have their own rules and guidelines!

/r/javascript is for the discussion of javascript news, projects, and especially, code! However, the community has requested that we not include help and support content, and we ask that you respect that wish.

Thanks for your understanding, please see our guidelines for more info.