JavaScript provides two functions to do this task. refer the code below
function test(x)
{
var z=x;
// This function will tell you the data type of the passed value, numeric, string
alert(typeof(z))
// This function will tell return true if numeric is not passed or false
alert(isNaN(z))
}
test(145)
__________________
Vikash Kumar Singh
|