Skip to content

Instantly share code, notes, and snippets.

@mkmik
Created December 12, 2014 21:12
Show Gist options
  • Save mkmik/ea889e5eef77bc6fe8a8 to your computer and use it in GitHub Desktop.
Save mkmik/ea889e5eef77bc6fe8a8 to your computer and use it in GitHub Desktop.
"1",
"true",
"false",
"null",
"undefined",
"1+2",
"1-2",
"1*2",
"1/2",
"1%2",
"1/-2",
"(1 + 2) * x + 3",
"1 + (2, 3) * 4, 5",
"(a=1 + 2) + 3",
"1 ? 2 : 3",
"1 || 2 + 2",
"1 && 2 || 3 && 4 + 5",
"1|2 && 3|3",
"1^2|3^4",
"1&2^2&4|5&6",
"1==2&3",
"1<2",
"1<=2",
"1>=2",
"1>2",
"1==1<2",
"a instanceof b",
"1 in b",
"1!=2&3",
"1!==2&3",
"1===2",
"1<<2",
"1>>2",
"1>>>2",
"1<<2<3",
"1 + + 1",
"1- -2",
"!1",
"~0",
"void x()",
"delete x",
"typeof x",
"++x",
"--i",
"x++",
"i--",
"a.b",
"a.b.c",
"a[0]",
"a[0].b",
"a[0][1]",
"a[b[0].c]",
"a()",
"a(0)",
"a(0, 1)",
"a(0, (1, 2))",
"1 + a(0, (1, 2)) + 2",
"new x",
"new x(0, 1)",
"new x.y(0, 1)",
"new x.y",
"1;",
"1;2;",
"1;2",
"1\nx",
"p()\np()\np();p()",
";1",
"if (1) 2",
"if (1) 2; else 3",
"if (1) {2;3}",
"if (1) {2;3}; 4",
"if (1) {2;3} else {4;5}",
"while (1);",
"while(1) {}",
"while (1) 2;",
"while (1) {2;3}",
"for (i = 0; i < 3; i++) i++",
"debugger",
"break",
"break loop",
"continue",
"continue loop",
"return",
"return 1+2",
"if (1) {return;}",
"if (1) {return 2}",
"throw 1+2",
"try { 1 }",
"try { 1 } catch (e) { 2 }",
"try {1} finally {3}",
"try {1} catch (e) {2} finally {3}",
"var x",
"var x, y",
"var x=1, y",
"var y, x=y=1",
"function x(a) {return a}",
"function x() {return 1}",
"[1,2,3]",
"[1+2,3+4,5+6]",
"[1,[2,[[3]]]]",
"{a: 1}",
"{a: 1, b: 2}",
"{}",
"(function(a) { return a + 1 })",
"(function f(a) { return a + 1 })",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment