I am looking for a JavaScript equivalent of the Python:
pass
statement that does not run the function of the ...
notation?
Is the
If you want to just use the pass operator in a ternary operator or just in an if statement in JS, you can do this:
a === true && console.log('okay')
You can use also use || operator but you should know that the || is the opposite of &&. Then if you want to use Pass in a function or a block in general as we do in Python like this:
def Func(): pass
In JS you should just leave the block empty as this:
if(){
console.log('ok')
}else{}
In the end, there are no braces in Python, so this is the main reason why we have a pass.