I want to convert a string to a number in JavaScript... How can I do that?

For example: a page that puts a and b together and has window.prompt to define a and b. But when a user sets a to lets say 3 (a = window.prompt("a=?", "3"), this is not a number 3 but a string "3" and therefore cannot be used in calculations.
So how can I convert this "3" string (or any other "number" string to a number?)