SyntaxFix
Write A Post
Hire A Developer
Questions
Use the === operator (strict equality) as below,
if (data === parseInt(data, 10)) alert("data is integer") else alert("data is not an integer")