@Fuzzylogics
I am not quite finished going through it and gaining understanding of the concepts presented yet.
-WWC
of course and endsWith wins, but the whole thread was about optimising this one approach. The regex approach would maybe pass the tests, but consider one string containing control chars?
This is what i did
function confirmEnding(str, target) {
var word = str.substring(str.length - target.length)
return (word == target);
}