Is there a JavaScript equivalent of the Python pass statement that does nothing?
use //pass
like python's pass
like:
if(condition){
//pass
}
This is equivalent to leaving the block with nothing in it, but is good for readability reasons.
reference from https://eslint.org/docs/rules/no-empty
Python's pass
mainly exists because in Python whitespace matters within a block. In Javascript, the equivalent would be putting nothing within the block, i.e. {}
.