JSFiddle - React, Tailwind, and code Playground

by Chuan Shao

JavaScript

//Test console.time() behavior.
function foo(){
    var x = 4.237;
    var y = 0;
    for (var i=0; i<100000000; i++) {
        y = y + x*x;
    }
    return y;
}

console.time("test");
foo();
console.timeEnd("test");