startsWith < String < JavaScript
The startsWith() of a String determines whether the string begins with the characters of a specified string and returns true or false.
const phrase = 'Saturday night plans';
console.log(phrase.startsWith('Sat'));
// true
console.log(phrase.startsWith('Sat', 3));
// false