Home > database >  Logical OR assignment (||=) not working on NodeJS
Logical OR assignment (||=) not working on NodeJS

Time:10-11

I am trying to use the Logical OR assignment ||=. My line of code is as simple as

parish.email ||= parishB.EMAIL

Though I am getting

/home/joao/dev/geoptapi/prepareServer.js:278
          parish.email ||= parishB.EMAIL
                       ^^^

SyntaxError: Unexpected token '||='

My Node version is v14.17.0

CodePudding user response:

Logical OR assignment is available on Node>=15

  • Related