Anonymous user
Higher-order functions: Difference between revisions
no edit summary
m (Function parameter moved to Function as an Argument: Clarify the topic, avoiding confusion with the general task of using a parametric function.) |
No edit summary |
||
Line 85:
Same as C.
== [[JavaScript]] ==
[[Category:JavaScript]]
function first(func) {
return func();
}
function second() {
return "second";
}
var result = first(second);
result = first(function() { return "third"; });
==[[Perl]]==
|