There are 4 ways to do it as far as I know.
Number(x);
parseInt(x, 10);
parseFloat(x);
+x;
By this quick test I made, it actually depends on browsers.
Implicit
marked the fastest on 3 browsers, but it makes the code hard to read… So choose whatever you feel like it!