Created
November 27, 2015 10:34
-
-
Save erictleung/121d99704346270be4db to your computer and use it in GitHub Desktop.
Return true/false on whether the target string is at the end of a given string.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function end(str, target) { | |
return str.substr(str.length - target.length) == target; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment