
You might wonder, what's the point of making a box appear, or changing its colour? When would that ever be useful?Īctually, quite often! If you can do that, then you know how to create HTML elements with JS. Learning by doing really is the best way to learn JavaScript.Īnything you work on will help you. Zuckerberg started making a site to rate the attractiveness of students on campus (on a whim, and while drunk, if The Social Network is to be believed). Something interesting and exciting to you. If it's too hard for your current level, no problem - just work on something easier, and maybe come back to it later.

or, just think of something cool you liked about a website you saw.

Make that blue box turn red when you click it.Make a blue box appear on a web page using JavaScript.Make the text "Hello World" appear on the page with JS.(well OK, you can finish reading this post first).ĭon't worry about what the "right" thing to make is. If you prefer to learn by experimentation, then just start. To use a concert analogy, learning JavaScript with books is like the supporting band - but learning by doing is the headline act. are all great - but you need to put what you learn into practice. However, note that you can't learn JavaScript purely through books. If the second description sounds like you, you might want to look into the best book to learn JavaScript, and do the exercises in it. If the first description sounds like you, then you'll want to dive in and just start making stuff. Others prefer a little guidance and like to follow some instruction - at least in the beginning.


