Checks if a given object is a closure.
isClosure(object)
returns boolean
Name | Type | Required | Default | Description |
---|---|---|---|---|
object | any | Yes | The object to check if it is a closure. |
square = function(x) {
return x * x;
};
writeDump(isClosure(square));
square = function(x) {
return x * x;
};
squared = square(5);
writeDump(isClosure(squared));