Comment Comment by pablovidal85 Negative substr() already does the trick, I don't see the need for endsWith() at all. 'test'.substr(-'st'.length) === 'st' parent pablovidal85 10 years ago