Skip to content

Instantly share code, notes, and snippets.

@ilearnjavascript
Created March 27, 2019 23:18
Show Gist options
  • Save ilearnjavascript/239b304e1d531c6b2771c96a7a4885ef to your computer and use it in GitHub Desktop.
Save ilearnjavascript/239b304e1d531c6b2771c96a7a4885ef to your computer and use it in GitHub Desktop.
es6 - new methods - 3.js
// ES5
'my string'.indexOf('str') !== -1;
// ES6
'my string'.includes('str');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment