โจminus one
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
JS โฉ value โฉ primitive โฉ String โฉ method โฉ .replace() โฉ example โฉ minus one
replit โฉ regex: replacer function (minusOne)
// amount-unit pattern
const amountUnitPattern = /\b(\d+) (\w+)\b/g;
// groups: โฐโ1โโฏ โฐโ2โโฏ
const stock = "1 lemon, 2 cabbages, and 101 eggs";
// matches: โฐโโโโโโฏ โฐโโโโโโโโโฏ โฐโโโโโโโฏ