JSFiddle - React, Tailwind, and code Playground

by Neal

JavaScript

var result = 1,
    term1 = 0,
    term2 = 1,
    i = 1;
while(i < 10)
{
    result = term1 + term2;
    console.log(result);
    term1 = term2;
    term2 = result;
    i++;
}