Created
August 18, 2011 11:16
-
-
Save nowelium/1153862 to your computer and use it in GitHub Desktop.
args
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
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' |
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 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