RegExp.prototype.exec vs String.prototype.match

Edit on GitHub

Setup

Tests

  • RegExp.prototype.exec

    /o/.exec('Hello World')
  • String.prototype.match

    'Hello World'.match(/o/)