Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (str.substr(-2) === "rn") {
- // yes, it does
- }
- if (/rn$/.test(str)) {
- // yes, it does
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement