actionscript-3 - 什么在变量的 if 语句中作为真(或假)传递

标签 actionscript-3 variables flex4.5

在这段代码中,myVar 的值是什么?将表现为 truefalse ?

if(myVar){}

例如,在 JavaScript 中,以下值是假的
null
undefined
0
''
false

最佳答案

对象

false if the instance is null; true otherwise



字符串

false if the value is null or the empty string ""; true otherwise



数字、整数或 uint

false if the value is NaN or 0; true otherwise





false



来自 here .

关于actionscript-3 - 什么在变量的 if 语句中作为真(或假)传递,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6493165/

相关文章:

actionscript-3 - 如何检测该区域是否在 as3 中 100% 绘制

variables - 如何访问 .exe 运行 Wix Bootstrap 的文件夹?

java - 如何使用字符串作为变量?

apache-flex - Flex 4.5 - 如何检测屏幕尺寸以使图像在移动设备上居中?

actionscript-3 - StageWebView在具有target = “_blank”的URL上缺少

actionscript-3 - 与 Erlang 服务器的 Flash 通信

javascript - 是否可以通过带有 JS/HTML5 的浏览器扩展访问嵌入在您不拥有的网站上的嵌入式 Flash 视频的参数?

actionscript-3 - AS3 Softbody 纹理八哥

c# - 为什么使用单个变量作为条件评估?

ios - 在没有苹果证书的情况下发布内置于 Flash Builder 4.5 中的 iOS 移动应用程序