Last active
August 29, 2015 14:13
-
-
Save jkup/db670a461c42c73d5032 to your computer and use it in GitHub Desktop.
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
def capitalizeAll(args: String*) = { | |
args.map (_.capitalize) | |
} | |
capitalizeAll("hello", "goodbye", "farewell") | |
// --vs-- | |
function capitalizeAll(Array $words) { | |
return array_map(function($word) { | |
return ucfirst($word); | |
}, $words); | |
} | |
capitalizeAll(array('hello', 'goodbye', 'farewell')); |
DrBoolean
commented
Jan 9, 2015
dang, that's way nicer! I'm still new at this haha :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment