Skip to content

Instantly share code, notes, and snippets.

@leobalter
Last active July 14, 2021 01:47
Show Gist options
  • Save leobalter/274ba70e6b5fd5ba79550a7c93e54cf5 to your computer and use it in GitHub Desktop.
Save leobalter/274ba70e6b5fd5ba79550a7c93e54cf5 to your computer and use it in GitHub Desktop.

Revisions

  1. leobalter revised this gist Jul 14, 2021. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions 😈.js
    Original file line number Diff line number Diff line change
    @@ -23,9 +23,13 @@ function tellMe() {
    } catch {
    return 'more';
    } finally {
    try{ try {} finally {
    return 'why!';
    } } catch {}
    try {
    try {
    /❋/
    } finally {
    return 'why!';
    }
    } catch {}
    throw 'donk';
    }

  2. leobalter renamed this gist Jul 14, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. leobalter renamed this gist Jul 14, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. leobalter revised this gist Jul 14, 2021. 2 changed files with 5 additions and 2 deletions.
    3 changes: 3 additions & 0 deletions output.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    ╰─ node 😈.js ─╯
    tell me why!
    2 42 b
    4 changes: 2 additions & 2 deletions 😈.js
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,6 @@ function tellMe() {
    return 'it\'s nothing but a headache!';
    }

    console.log(`tell me ${tellMe()}`);
    console.log(`tell me ${tellMe()}`); // tell me why!

    console.log(x, y, z());
    console.log(x, y, z()); <!-- 2 42 'b'
  5. leobalter created this gist Jul 14, 2021.
    37 changes: 37 additions & 0 deletions 😈.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    --> HELLo!

    var x = 2;
    var y=42<!--x;
    function z() {
    return 'a';
    }

    with (new Proxy(globalThis, {})) {
    function z() {
    return 'b';
    }
    {
    function z() {
    return 'c';
    }
    }
    }

    function tellMe() {
    try {
    return 'no';
    } catch {
    return 'more';
    } finally {
    try{ try {} finally {
    return 'why!';
    } } catch {}
    throw 'donk';
    }

    return 'it\'s nothing but a headache!';
    }

    console.log(`tell me ${tellMe()}`);

    console.log(x, y, z());