Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

performance.now() javascript

<script>
  const t0 = performance.now();
  for (let i = 0; i < 10; i++) {
    console.log(i);
  }
  const t1 = performance.now();
  console.log(`Call to doSomething took ${t1 - t0} milliseconds.`);
</script>
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #javascript
ADD COMMENT
Topic
Name
6+5 =