Created
July 25, 2014 06:19
-
-
Save theosp/0dee9e8247364d10996f to your computer and use it in GitHub Desktop.
removeTrailingUndefs
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
removeTrailingUndefs = (arr) -> | |
while (not _.isEmpty arr) and (_.isUndefined _.last arr) | |
arr.pop() | |
return arr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment