How to check if string starts with substring in JavaScript

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

string.startsWith("js");
true