I'm self teaching myself JavaScript from videos I've dug up from around the Internet. Most tend to gloss over things quickly and leave tons of questions. So I test things within Firefox 21 using Firebug 2.0.2 to see how they behave. That's the only purpose of the following code.
Console.log output
>>> var n=parseInt("34","22","18",10);console.log(n);
70
My initial thoughts was that it parsed each of the supplied strings and then returned the sum. Then I did the actual math and realized the sum should have came out to be 74 if that were the case.
Even more interesting, and what actually prompted me to do the math on my own instead of just trusting that to be the sum without thinking. When I reduced the value of one of the numeric strings (22 to 21 in my experience anyways) returned 67 instead of the expected 69.
Console.log output
in:10>>> var n=parseInt("34","21","18",10);console.log(n);
67
What is actually happening here? Is parseInt just not designed to accommodate multiple numeric strings?