I was stumbling on http://lihaoyi.github.io/hands-on-scala-js/ where I found below :
javascript> ["10", "10", "10", "10"].map(parseInt)
[10, NaN, 2, 3] // WTF
scala> List("10", "10", "10", "10").map(parseInt)
List(10, 10, 10, 10) // Yay!
Below are details of map() from : http://www.tutorialspoint.com/javascript/array_map.htm
Javascript array map() method creates a new array with the results of calling a provided function on every element in this array.
No explanation given on former link mentioned. Couldn't understand whats going on with 2nd param? Why is parseInt returning NaN?