What is javascript `_ | _`?

I looked at the solution to the problem in javascript, namely, parsed the string into its compound names, operators and brackets when I saw this expression:

return accept(")") ? _|_ : e;

What is that _|_? Is the node function used _? I was looking for documentation but not found.

When I try to use it myself, this happens:

> 5
5
> true ? _|_ : 0
ReferenceError: _ is not defined
    at eval:1:1
    at eval
    at n.<anonymous>

As an explanation, the variable was _not defined anywhere in the code.

This was run on node v8.1.3, but also works fine on the Chrome JS built-in browser.

Here is the code:

function tokenise(string) {
  const tokens = string.match( /[a-z]+|\(|\)|[!#$%&*+\-\/<=>@^_.,;]+/gi ) || [];
  const accept = s => s===tokens[0] && tokens.shift() ;
  const unaccept = s => s!==tokens[0] && tokens.shift() ;
  const singles = (e) => ( e = unaccept(")") ) ? [ e, ...brackets() ] : [] ;
  const brackets = (e) => accept("(") ? ( e = brackets(), accept(")") || _|_ , [ e, ...brackets() ] ) : singles() ;
  try      { let e = brackets(); return accept(")") ? _|_ : e ; }
  catch(_) { return null; }
}
+6
source share
3 answers

_|_ JavaScript, | ( ) _ .

accept , , |; e.

node _?

_ node. REPL () , ; .

, _ - .

, accept(")") , ReferenceError, _ . , , | , georg , , , _|_ bottom ( ", " ), . , -, ( throw , - ).

+9

_ | .

32- .

+5

, , JavaScript, ...

, , Text Art, aka ASCII Art, , , , 100% .

, , - .

0

All Articles