tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

S13_A9.js (697B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: Function can be passed as argument
      6 es5id: 13_A9
      7 description: Using function as argument of another function
      8 ---*/
      9 
     10 function __func__INC(arg){return arg + 1;};
     11 function __func__MULT(incrementator, arg, mult){ return incrementator(arg)*mult; };
     12 
     13 //////////////////////////////////////////////////////////////////////////////
     14 //CHECK#1
     15 if (__func__MULT(__func__INC, 2, 2) !== 6) {
     16 throw new Test262Error('#1: function  can be passed as argument');
     17 }
     18 //
     19 //////////////////////////////////////////////////////////////////////////////
     20 
     21 reportCompare(0, 0);