Syntax error in IE using ES6 arrow functions

IE doesn’t support ES6, so you’ll have to stick with the original way of writing functions like these.

price = price.replace(/(.*)\./, function (x) {
  return x.replace(/\./g, '') + '.';
});

Also, related: When will ES6 be available in IE?

Leave a Comment