JSFiddle - React, Tailwind, and code Playground

by shubh0602

JavaScript

function isInteger(x){
    var isnumber= !isNaN(x);
    console.log(isnumber);
    return isnumber;
}
isInteger(1);
isInteger('1');
isInteger(null);
isInteger(undefined);