JS-Interpreter Demo

Enter JavaScript code below, then click Parse. To execute, either click Step repeatedly, or click Run once. Open your browser's console for errors.

var result = []; function fibonacci(n, output) { var a = 1, b = 1, sum; for (var i = 0; i < n; i++) { output.push(a); sum = a + b; a = b; b = sum; } } fibonacci(16, result); alert(result.join(', '));

Parse Step Run

Read the JS-Interpreter documentation.

Get the source code.