8-string-to-integer-atoi
DevGod needs to write a blog entry for this problem!
/**
* @param {string} s
* @return {number}
*/
var myAtoi = function(s) {
return Math.max(Math.min(parseInt(s) || 0, 2**31-1), -(2**31))
};
/**
* @param {string} s
* @return {number}
*/
var myAtoi = function(s) {
return Math.max(Math.min(parseInt(s) || 0, 2**31-1), -(2**31))
};