) { // array literal + mapping function    return new LCMCalculator(pair[0], pair[1]);}).sort(function(a, b) { // sort with this comparative function    return a.lcm() - b.lcm();}).forEach(function(obj) {    /* Note: print() is a JS builtin function available in Mozilla's js CLI;     * It is functionally equivalent to Java's System.out.println().     * Within a web browser, print() is a very different function      * (opens the "Print Page" dialog),     * so use something like document.write() or alert() instead.     */    // print       (obj + ", gcd = " + obj.gcd() + ", lcm = " + obj.lcm());    // alert       (obj + ", gcd = " + obj.gcd() + ", lcm = " + obj.lcm());    document.write(obj + ", gcd = " + obj.gcd() + ", lcm = " + obj.lcm() + "<br />");});    </script>    <noscript>(Message from JavaScript example) <br /> Your browser either does not support JavaScript, or you have JavaScript turned off.    </noscript>  </body></html>The following output should be 