Search code examples
javascriptpythonfunctionlexical

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


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?


Solution

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