New extension: Control Flow

The next extension for the Interpreter challenge is now live: Control Flow.

This extension builds on the work from the previous one and covers Chapter 9 of the book.

By the end of this extension, your interpreter will be able to handle control flow statements like if/else , while & for, enabling you to print Fibonacci numbers like this:

var a = 0;
var temp;

for (var b = 1; a < 10000; b = temp + b) {
  print a;
  temp = a;
  a = b;
}

Please give this a try and let us know how it can be improved! @ryan-gang (author of this extension), and I will be available here to help out with any tester/instruction issues.

1 Like