double not(!!)有什么意义吗? [英] does double not(!!) have any significance?

查看:198
本文介绍了double not(!!)有什么意义吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我遇到了一个声明,其中有两倍(!!)。这是什么意思?

Yesterday i came across a statement which has double not(!!). What does that mean?

推荐答案

看看这个 ..你会在开始时看到;)
Have a look at this.. You will see at the begining ;)


我可以想象,它迫使对象转换为布尔值(一个简单的!将转换为布尔对面,所以!!应转换为布尔等价物)
I could imagine, that it forces the object to convert to boolean (a simple ! will convert to the boolean opposite, so !! should convert to the boolean equivalent)


看看我的代码。
Have a look at my code.
展开 | 选择 | Wrap | 行号


这篇关于double not(!!)有什么意义吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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