Skip to content

Instantly share code, notes, and snippets.

@nowelium
Created August 18, 2011 11:16
Show Gist options
  • Save nowelium/1153862 to your computer and use it in GitHub Desktop.
Save nowelium/1153862 to your computer and use it in GitHub Desktop.
args
var foo = function(a, b, c){
return a + ":" + b + ":" + c
};
var bar = function (){
return foo.apply(null, arguments);
};
bar('hello', 'js', 'world')
// ==> 'hello:js:world'
def foo(a, b, c):
return a + ":" + b + ":" + c
def bar(*args):
return foo(*args)
bar('hello', 'python', 'world')
# ==> 'hello:python:world'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment