@JohnMcDonald I think it's less an issue with chrome and more with the fiddle itself. I've changed that script tag to something I know works, and it's still ignored
I copied the javascript into the javascript box, and then it told me, "document.write is disallowed in JSFiddle envioriment and might break your fiddle." which could be another problem
So, instead of: moveForward(); yield 10;, it would be: moveForward(); return { next: function() { return 10; }} ? I don't think I'm thinking about this quite right
@John if you want to do it very similar to how the C# compiler for example creates the yield function
var state = 0;
var next = function() {
switch(state) {
case 0:
scanRight();
state=1;
return 3;
case 1:
if (scanResult == BOT) {
turnRight();
state=2;
return 10;
} else {
moveForward();
state = 3;
return 10;
}
case 2:
shoot();
state = 0; // end while loop
return 10;
case 3: