I want to delete the first character of a string, if the first character is a 0. The 0 can be there more than once.
Is there a simple function that checks the first
try
s.replace(/^0/,'')
console.log("0string =>", "0string".replace(/^0/,'') ); console.log("00string =>", "00string".replace(/^0/,'') ); console.log("string00 =>", "string00".replace(/^0/,'') );