Skip to content

Instantly share code, notes, and snippets.

@blackavec
Created January 21, 2020 08:22

Revisions

  1. blackavec created this gist Jan 21, 2020.
    20 changes: 20 additions & 0 deletions scenario-bytecode-gen-for.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    function testFor(obj) {
    let i = 10

    for(;;) {
    if (i-- === 0)
    return true
    }
    }

    function testWhile(obj) {
    let i = 10

    while(true) {
    if (i-- === 0)
    return true
    }
    }

    testFor();
    testWhile();