是否有与Python pass语句等效的JavaScript,它什么都不做? [英] Is there a JavaScript equivalent of the Python pass statement that does nothing?

查看:142
本文介绍了是否有与Python pass语句等效的JavaScript,它什么都不做?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找与Python等效的JavaScript:

I am looking for a JavaScript equivalent of the Python:

pass 语句不运行 ... 表示法的功能?

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

JavaScript中有这种东西吗?

推荐答案

Python的 pass 主要存在是因为在Python中,空格在一个块内很重要.在Javascript中,等价物不会在代码块中放置任何内容,即 {} .

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

这篇关于是否有与Python pass语句等效的JavaScript,它什么都不做?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆