What is the jQuery equivalent of "return" in Ruby?
I'm referrin开发者_JAVA百科g to the return
that quits running the function.
return
will do just that, although because ruby methods will always return the value produced by the last expression, most developers don't use it explicitly.
Its the same return x;
and it will return the value.
function(x,y){
return x+y;
}
精彩评论