Created
July 3, 2014 06:13
-
-
Save hehongwei44/fca3f169ad547fc4ba5d to your computer and use it in GitHub Desktop.
判断传入的参数是否为数字
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @descrition : 该函数的功能是判断转入的参数是否为数字类型。 | |
* @param->o : 传入的参数,参数可以为任何类型。 | |
* @return: true表示为数字,false为非数字 | |
* | |
*/ | |
var isNumber = function(o) { | |
return !isNaN(o); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment