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

前端 未结 9 663
感情败类
感情败类 2021-02-06 20:02

I am looking for a JavaScript equivalent of the Python:

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

Is the

9条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-06 20:38

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

提交回复
热议问题