162
rated 0 times
[
168]
[
6]
/ answers: 1 / hits: 52680
/ 12 Years ago, thu, april 19, 2012, 12:00:00
In python, to return multiple variables, I can do --
def function_one(i):
return int(i), int(i) * 2
value, duble_value = function_one(1)
How would I achieve this same result using javascript if functions may only return a single return value? (I assume using an array?)
More From » function