- Home /
Question by
chelnok · Sep 25, 2012 at 05:16 PM ·
javascriptjavascript-specificfunction call
How to pass parameters to function that is stored in variable?
I have tried few things, like this:
var w:function() = ww1(1);
function ww1(p:int)
{
print(p);
}
function ww2()
{
print(2);
}
Comment
Best Answer
Answer by DaveA · Sep 25, 2012 at 07:50 PM
In JS for example:
var fn = Myne;
function Start () {
fn (2);
}
function Myne (j : int) {
print ("it's "+j);
}
Thanks.. i think i tried that, but probably not :) ..what ever i did wrong i got weird void error message. Anyways, your solution works.