How to check if string ends with substring in JavaScript

Strings
By Jad Joubran · 
Last updated Feb 01, 2018
const string = "js is awesome";

string.endsWith("awesome");
true