Function Declarations vs. Function Expressions

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Function Declaration
function X() { return "hello"; }
function Y() { return X(); }
function Z() { return Y(); }
Z();
ready
Function Expression
var X = function () { return "hello"; };
var Y = function () { return X(); };
var Z = function () { return Y(); };
Z();
ready
Function Expression 2
var X = function () { return "hello"; },
Y = function () { return X(); },
Z = function () { return Y(); };
Z();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.