Skip to content

Commit 959776b

Browse files
committed
JS: add test case
1 parent d69e584 commit 959776b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
function f(arr) {
2+
if (arr.length > 2) {} // OK
3+
4+
let x = arr.length || 0;
5+
if (x > 2) {} // OK
6+
7+
let y = arr.length && 3;
8+
if (y > 2) {} // OK
9+
}

0 commit comments

Comments
 (0)