In my post yesterday about multiple-values I used the keyword ‘let’ in some of the examples. This is another feature of the Mozilla Javascript platform. I assume it is named after ‘let’ from Lisp, because it performs the same task: letting you bind values in block scope. As you know, the scope of variables in [...]
03
Mar
Returning Multiple Values
Mozilla’s Javascript platform supports returning multiple values, as of version 1.7. I don’t know when that got incorporated into the XUL platform, but the features from 1.7 are usable there. In fact, we already use this in ColorFish: this.getHSL = function () { var h, s, l; // … return [h, s, l] } The [...]




