Check if a string ends with the value of the string
You can pass a second parameter with an integer value and (if present)
endsWith() will consider the original string as if it was long that many characters:
It was introduced in ECMAScript 2015.
Here's my latest YouTube video. I talk about why I think that dogs are a great help for developers working remotely: