JavaScript 检查是否是数字Number的isInteger方法


JavaScript 检查是否是数字Number的isInteger方法

<html>
   <head>
      <title>JavaScript isInteger() Method </title>
   </head>

   <body>
      <script>
         document.write(Number.isInteger(30));
         document.write("<br>"+Number.isInteger(true));
         document.write("<br>"+Number.isInteger(false));
         document.write("<br>"+Number.isInteger(-30));
      </script>
   </body>
</html>