Skip to content

Instantly share code, notes, and snippets.

@HaradaKumiko
Created February 21, 2022 14:30
Show Gist options
  • Save HaradaKumiko/d66a25b3f6839938091971abcfca0559 to your computer and use it in GitHub Desktop.
Save HaradaKumiko/d66a25b3f6839938091971abcfca0559 to your computer and use it in GitHub Desktop.
const smallArray = [5, 3, 2, 35, 2];
const bigArray = [5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2, 5, 3, 2, 35, 2];
const start = performance.now()
smallArray.push(10)
const end = performance.now()
console.log(`Time : ${end-start}`)
@HaradaKumiko
Copy link
Author

Kurang dari 1 milisecond
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment