const name = "Anubhav Tiwari";
const inc = "v T";
// const starts = "Anu";
let starts = "Anu";
const ends = "ar";
console.log(`includes() => the word "${inc}" ${inc ? 'is' : 'is not'} in ${name}`);
console.log(`startsWith() => the word "${starts}" ${name.startsWith(starts) ? 'is' : 'is not'} in ${name}`);
starts = "Anubhav";
console.log(`startsWith() => the word "${starts}" ${name.startsWith(starts) ? 'is' : 'is not'} in ${name}`);
console.log(`endsWith() => the word "${ends}" ${name.endsWith(ends) ? 'is' : 'is not'} in ${name}`);
console.log(`endsWith() => the word "${ends}" ${name.endsWith(ends, 13) ? 'is' : 'is not'} in ${name}`);
Output: