是否有一个javascript等效的python pass语句什么都不做? [英] Is there a javascript equivalent for the python pass statement that does nothing?

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

问题描述

我正在寻找一个没有做任何事情的python 传递语句的javascript等价物。 javascript中有这样的东西吗?

I am looking for a javascript equivalent for the python pass statement that does nothing. Is there such a thing in javascript?

推荐答案

Python的传递主要存在,因为在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. {}.

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

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