How to check if string ends with substring in JavaScript

Strings
Last updated Feb 01, 2018
const string = "js is awesome";

string.endsWith("awesome");
true