default operator test

Benchmark created by Chuan Yuan on


Description

<h2>Comparing two ways to write the default operator in javascript. </h2>

Test runner

Ready to run.

Testing in
TestOps/sec
the popular way
window.myname = window.myname || "hello";
ready
a bit of different way
window.myname || (window.myname = "hello");
ready

Revisions

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

  • Revision 1: published by Chuan Yuan on