Created
August 12, 2018 23:22
-
-
Save arrbxr/819490b34bcda98bd2c93c2725b9b68b to your computer and use it in GitHub Desktop.
confirm the ending created by arrbxr - https://repl.it/@arrbxr/confirm-the-ending
This file contains hidden or 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 confirmEnding(str, target) { | |
| // "Never give up and good luck will find you." | |
| // -- Falcor | |
| if(str.slice(str.length-target.length) === target){ | |
| return true; | |
| } | |
| else | |
| return false; | |
| } | |
| confirmEnding("Congratulation", "on"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment