In Javascript the function occupies a rather unusual role – it’s a first class object. That is a Javascript function is an instance of a Function object. This much is fairly well know but it’s also a ...
What about other side of the coin, passing a copy of an object? Being able to do this mimics pass by value for objects. This turns out to be fairly easy – all we need is a clone function. For example, ...