JSFiddle - React, Tailwind, and code Playground

by karthick6891

HTML

<!--co routine -->

Babel + JSX

function* test() {
    console.log('Hello!');
    var x = yield;
    console.log('First I got: ' + x);
    var y = yield;
    console.log('Then I got: ' + y);
    yield;
    console.log('End');
}

var tester = test();
tester.next(); 
tester.next('a cat');
tester.next('a dog');
tester.next();