Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript time of execution

const { JSDOM } = require("jsdom");
const { window } = new JSDOM();
 
var start = window.performance.now();
 
// task starts
for (var i = 0; i < 100000000;i++);
// task ends
 
var end = window.performance.now();
console.log(`Execution time: ${end - start} ms`);
Source by www.techiedelight.com #
 
PREVIOUS NEXT
Tagged: #javascript #time #execution
ADD COMMENT
Topic
Name
9+8 =