Skip to content

Instantly share code, notes, and snippets.

@3014zhangshuo
Created December 28, 2018 08:32
Show Gist options
  • Save 3014zhangshuo/f15b126370bea660522df9e1d9ec73b8 to your computer and use it in GitHub Desktop.
Save 3014zhangshuo/f15b126370bea660522df9e1d9ec73b8 to your computer and use it in GitHub Desktop.
anonymous function example in ruby and javascript
var sum = function (a, b) {
return a + b;
}
sum = Proc.new { |a, b| a + b }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment