Is there a JavaScript equivalent of the Python pass statement that does nothing?

user781486 picture user781486 · Oct 28, 2015 · Viewed 78k times · Source

I am looking for a JavaScript equivalent of the Python:

pass statement that does not run the function of the ... notation?

Is there such a thing in JavaScript?

Answer

jakevdp picture jakevdp · Oct 28, 2015

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. {}.