If I want to learn javascript with a small project, what should I do?

I found that javascript is not so easy to master. And I want to dive into it. I think learning using is a good way. Since javascript is different from another C-style language, which project is good for learning?

Thanks.

+1
javascript
source share
4 answers

You can execute any project that includes an interactive interface, and then create it as a web page.
This will give you a lot of information about js, from syntax to event handling.

For example: calculator

+4
source share

Since it is inevitable that people will offer training resources (while the question is about projects, here we need a CW answer for people to use these resources.

Books

  • JavaScript: The Ultimate Guide (5th ed.) By David Flanagan. A good book from a good author. A bit dated.

Online Resources

  • Specification (there is no new version of the 5th release!). The language is vague, but when you want to know exactly how something should work ...
  • http://javascript.crockford.com/ Douglas Crockford is very good at JavaScript. Not everyone (including me, etc.) agrees with all of Crockford's conclusions, especially around things like the new operator, but he knows his things, and therefore, if you take his various essays as observations to think, not Gospel, he is very educated and reflects.
  • Mozilla Developer Center
+1
source share

The first project I would do is get JsUnit to work and figure out how I will run the tests that I write for the rest of the project on a regular basis (for example, in simulated or real continuous integration).

0
source share

Since you have not published your age:
Playing with Canvas can be a good start. The way I learned AS2 [with similar features and ECMAScript style syntax like JavaScript], created "Canvas" (MovieClip) and played with lineTo and moveTo.

With this, you could write simple games like Pong [my first AS2 game] with simple AI ...

Joining this project will cover:

  • User input
  • Graphic arts
  • Variables
  • Flow management
  • Settimeout
  • Logics
  • Collision detection

Pong is a great first project because you can customize whatever you want. When I wrote my version, I did this by holding Enter, you can place the block in the middle of the screen so that the ball bounces. The possibilities are mostly endless = /


If you are interested in more "classic" web design [non-RIA stuff]
You can go for a simple backlit game that takes about 30 minutes to write.

0
source share

All Articles