Interview Questions

CHECK IF A VARIABLE IS AN INTEGER IN JAVASCRIPT

PHP Interview Questions and Answers


(Continued from previous question...)

CHECK IF A VARIABLE IS AN INTEGER IN JAVASCRIPT

var myValue =9.8;
if(parseInt(myValue)== myValue)
alert('Integer');
else
alert('Not an integer');

(Continued on next question...)

Other Interview Questions