JavaScript中的或运算

 

Expression Result
true || true true
true || false true
false || true true
false || false false
1 || 1 1
1 || 0 1
0 || 1 1
0 || 0 0
true || 1 true
1 || true 1
true || 0 true
false || 0 0
0 || false false
false || 1 1
1 || false 1
null || null null
null || false false
false || null null
null || true true
true || null true
null || 0 0
0 || null null
null || 1 1
1 || null 1
undefined || undefined undefined
undefined || true true
true || undefined true
undefined || false false
false || undefined undefined
undefined || null null
null || undefined undefined
undefined || 1 1
1 || undefined 1
undefined || 0 0
0 || undefined undefined

 

代码:https://files.cnblogs.com/owen-zhang/JavaScript_Or.rar

 

posted on 2009-12-23 11:56  Owen_Zhang  阅读(503)  评论(0编辑  收藏  举报