It is possible to write more short function

It is possible to write more short function
0

#21

@Fuzzylogics
I am not quite finished going through it and gaining understanding of the concepts presented yet.
:sunglasses:
-WWC


#23

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?


#25

This is what i did

function confirmEnding(str, target) {
var word = str.substring(str.length - target.length)
return (word == target);
}