Created
November 9, 2017 22:46
-
-
Save shallaa/ac50b564b8851a54fe9ab74ee238d8fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (const i of [1, 2, 3, 4]) { | |
if (i === 3) break; | |
log(i); | |
} | |
abc: { | |
log('a'); | |
if (location.href.includes('.com')) break abc; | |
log('b'); | |
let b = 4; | |
} | |
log('c'); | |
k:{ | |
let a = 3; | |
const f = () => { | |
let a = 5; | |
k:{ | |
break k; | |
log(37); | |
} | |
log(a); | |
}; | |
f(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let a = 3, b = 0; | |
switch (true) { | |
case a > 5 && a < 10: log('a', a); break; | |
case a > 4: log('b', a); break; | |
case a > 3: log('c', a); break; | |
case a > 2: log('d', a); break; | |
default: | |
} | |
a:const c = 3; | |
if (c === 1) { | |
} else { | |
if (c === 2) { | |
} else { | |
} | |
} | |
if (c > 5) { | |
} else switch (c) { | |
} | |
if (c > 5) { | |
} else for (;;) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'', false, 0, undefined, null, NaN // falsy | |
for (; ; ) { | |
} | |
var a = act.method().c; | |
while(a) { | |
let r = other.action(); | |
a = act.method().c; | |
if (r === 'abc') a = false; | |
} | |
do a++; while (a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment