Search code examples
javascriptreserved-words

What is JavaScript `pass`


I was reading on MDN on mobile, so maybe I've missed something obvious. I've seen in this code the method pass being used.

var allPass = true;
var i, j;

top:
for (i = 0; items.length; i++)
  for (j = 0; j < tests.length; i++)
    if (!tests[j].pass(items[i])){
      allPass = false;
      break top;
     }

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label

Googling "mdn pass" got me nowhere. What is pass?


Solution

  • pass is a method of an array element (some kind of test function)