Printing h(f), y(3), which should both be 9.
Here is the Javascript for that output:
// Javascript supports first-class functions
function f (x) {
return x * x;
}
function g () { //first-class return
return f;
}
function h (w) { //first-class argument
return w(3);
}
var y = g();