Created
November 21, 2019 01:54
-
-
Save nixbytes/743613df2e04c1a6aaa095390cd13cd8 to your computer and use it in GitHub Desktop.
javascript performance testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const startingTime = performance.now(); | |
| for (let i = 1; i <= 100; i++) { | |
| for (let j = 1; j <= 100; j++) { | |
| console.log('i and j are ', i, j); | |
| } | |
| } | |
| const endingTime = performance.now(); | |
| console.log('This code took ' + (endingTime - startingTime) + ' milliseconds.'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment