Node.js Tutorial

Node.js If...Else

Source: Bro Code

Conditional Statements

Use conditions to run different code paths based on logical tests.

NODEJS
if (process.env.NODE_ENV === 'production') console.log('prod');
Try it Yourself