I explain, i'm working on a game that give you points if you choose the correct answer to a question. Now the points are always the same but i want to give points depending of how fast is the user answering. Any idea of "counting time" and transforming into points (my english is so bad... sorry)

How to count time?
rpreston
Sure -- you can use ECMAScript's built-in Date object to do that.
When you ask a question, remember the time you did it:
Then when you get the answer from the user, get the current time:
Then get the difference, in seconds: