javascript默认将数字类型的“002,00123”,作为整数,去掉前面的0

 
javascript默认将数字类型的“002,00123”,作为整数,去掉前面的0 .
1.javascript默认将数字类型的“002,00123”,作为整数,去掉前面的0

<script type="text/javascript">
       //javascript默认将数字类型的“002,00123”,作为整数,去掉前面的0
      var otherArray = new Array(001,002,"003","004","00abc");

      
      for(var j = 0;j<otherArray.length;j++)
      {
     
               alert(otherArray[j]);
      }
     
        
    </script>

原文地址:https://www.cnblogs.com/qqzy168/p/3136995.html