- Instant help with your JavaScript coding problems
endsWith(searchString, length)
endsWith(searchString: string, endPosition?: number): boolean;
let str = 'To be, or not to be, that is the question.'
console.log(str.endsWith('question.')) // true
console.log(str.endsWith('to be')) // false
console.log(str.endsWith('to be', 19)) // true