I am looking for a JavaScript equivalent of the Python:
pass
statement that does not run the function of the ...
notation?
Is the
Javascript does not have a python pass
equivalent, unfortunately.
For example, it is not possible in javascript to do something like this:
process.env.DEV ? console.log('Connected..') : pass
Instead, we must do this:
if (process.env.DEV) console.log('Connected..')
The advantage of using the pass
statement, among others, is that in the course of the development process we can evolve from the above ternary operator example in this case without having to turn it into a full if
statement.