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

Question

Asked By – guagay_wk

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?

Now we will see solution for issue: Is there a JavaScript equivalent of the Python pass statement that does nothing?


Answer

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

This question is answered By – jakevdp

This answer is collected from stackoverflow and reviewed by FixPython community admins, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0