return

  • Updated

A return statement in irScript is used to exit a function and, optionally, specify a return value.

var x = function () { return 33; };
var y = x();
function DoStuff( arg )
{
arg.SomeProperty = x();
if( arg.SomeProperty > 100 )
{
return;
}
else
{
arg.SomeOtherProperty = 'some value';
}
}

var z = { Class : 'MyObject' };

DoStuff(z);

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.