📌  相关文章
📜  javascript 从字符串中删除前导零 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:35.627000             🧑  作者: Mango

代码示例1
use a regular expression like this  

var strNumber = "0049";  
console.log(typeof strNumber); //string  
  
var number  = strNumber.replace(/^0+/, '');