diff options
author | Zachary Ferguson <zfergus2@users.noreply.github.com> | 2015-10-06 18:19:20 -0400 |
---|---|---|
committer | Zachary Ferguson <zfergus2@users.noreply.github.com> | 2015-10-06 18:19:20 -0400 |
commit | c4f93c0b0ec1fcea11e336b67929b9d6f426765c (patch) | |
tree | a97e9f7a56330e45122bb81bb5194f2aefe03fdb /zh-cn | |
parent | 29cbff176857653422555650c983afef4a28ae1f (diff) | |
parent | 55c80f255202b03c4c3a66ac1d37f880a3782b68 (diff) |
Merge remote-tracking branch 'adambard/master'
Conflicts:
java.html.markdown
Diffstat (limited to 'zh-cn')
-rw-r--r-- | zh-cn/csharp-cn.html.markdown | 3 | ||||
-rw-r--r-- | zh-cn/javascript-cn.html.markdown | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/zh-cn/csharp-cn.html.markdown b/zh-cn/csharp-cn.html.markdown index a3cda5b3..971c1be9 100644 --- a/zh-cn/csharp-cn.html.markdown +++ b/zh-cn/csharp-cn.html.markdown @@ -232,7 +232,8 @@ on a new line! ""Wow!"", the masses cried"; // 三元表达式 // 简单的 if/else 语句可以写成: // <条件> ? <真> : <假> - string isTrue = (true) ? "True" : "False"; + int toCompare = 17; + string isTrue = toCompare == 17 ? "True" : "False"; // While 循环 int fooWhile = 0; diff --git a/zh-cn/javascript-cn.html.markdown b/zh-cn/javascript-cn.html.markdown index dfeb2012..bdef0099 100644 --- a/zh-cn/javascript-cn.html.markdown +++ b/zh-cn/javascript-cn.html.markdown @@ -447,9 +447,6 @@ myNumber === myNumberObj; // = false if (0){ // 这段代码不会执行,因为0代表假 } -if (Number(0)){ - // 这段代码*会*执行,因为Number(0)代表真 -} // 不过,包装类型和内置类型共享一个原型, // 所以你实际可以给内置类型也增加一些功能,例如对string: |