tags:

views:

138

answers:

5

Hey, guys!
I found javascript is not so easy to master. And I want to dive into it. I think learning by using is a good way. Since javascript is different from other C-style language, what kind of project is good for learning?

Thanks.

A: 

The first project I'd do is get JsUnit working and figure out how I'm going to run the tests I write for the rest of the project on a regular basis (as in, simulated or real continuous integration).

Aren't unit tests a bit advanced for someone just getting into JavaScript?
musicfreak
I had to type these characters so that I could get to the answer: No. Since writing a good test is the most critical skill that any developer can have, it makes sense that it should be the first one that starts to develop.
+2  A: 

You can take up any project that involves an interactive UI, then build it as a web page.
It will give you a lot to learn about js, from syntax to event handling.

E.g: a calculator

Here Be Wolves
A very good suggestion, encapsulates user input, asynchronicity, responding to events, logic...
T.J. Crowder
A calculator is actually how I first went beyond the basics of JavaScript. Then I discovered jQuery and realized that I wasted my time.
musicfreak
I really like the idea of calculator
xiao
A: 

First, you should get familiar with JS, and start with some tutorial. You will get the idea in time.

Start here: http://www.w3schools.com/js/default.asp

pinusnegra
The question was about choosing a *project* to dive into.
T.J. Crowder
+1  A: 
T.J. Crowder
A: 

Since you didn't post your age:
Playing around with Canvas might be a good start. The way I learned AS2 [which has similar functions and ECMAScript-style syntax, like JavaScript] was by creating a "Canvas"(MovieClip) and playing around with lineTo and moveTo.

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

Embarking on this project would cover:

  1. User Input
  2. Graphics
  3. Variables
  4. Flow Control
  5. setTimeout
  6. Logic
  7. Collision detection

Pong is a great first project, because you can customize it all that you want. When I wrote my version, I made it so by holding Enter, you could place a block in the middle of the screen, that the ball would bounce off of. The possibilities are basically endless =/


If you're interested in more "classic" web development [non-RIA things]
You could go for a simple lights-out game, which would take around 30 minutes to write.

ItzWarty
Is it too difficult to master? How much time will it take?
xiao
Lights out is a very easy game to write. It just requires you draw equally sized squares in a grid =/ Simple collision detection [mouse in square?] is probably the most advanced thing you'll do >_>
ItzWarty