remove zero if found at beginning of string javascript code example Example: avoiding 0 at front in javascript number.replace(/^0+/, '')