String.prototype.endsWithbeginnerconst str = 'Hello, World!'
str.endsWith('!') // β true
str.endsWith('World') // β false
str.endsWith('World', 12) // β trueUse endsWith() to check if a string ends with a specific suffix, with an optional end position.
Every string ends with the empty string ''.
Challenge: Implement endsWithEmpty(str) that returns str.endsWith('').
endsWithEmpty('anything') // β true
endsWithEmpty('') // β true