var longString = "this string is long but why"
var shortString = "but why"
How can i test if shortString is the not only contained in longString but it is actually the last part of the string.
I used indexOf == 0
to test for the start of the string but not sure how to get the end of it
javascript
im assuming? – Prolegomenon