Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

timing code in javascript

var output = "";

// Start timing now
console.time("concatenation");

for (var i = 1; i <= 1e6; i++) {
  output += i;
}

// ... and stop.
console.timeEnd("concatenation");
Source by mariusschulz.com #
 
PREVIOUS NEXT
Tagged: #timing #code #javascript
ADD COMMENT
Topic
Name
9+1 =