console.time & console.timeEnd
console.time starts the time and
console.timeEnd stops the timer and spits out the duration:
// Kick off the timer
// (Do some testing of a forEach, for example)
// End the timer, get the elapsed time
// 4522.303ms (or whatever time elapsed)
Passing a timer name as the first argument allows you to manage concurrent timers. The
console.timeEnd call immediately spits out the elapsed time in milliseconds.
There are more advanced techniques for performance testing and benchmarking but
timeEnd provide a quick manual method for speed testing!
For quite a long time now websites with the so called "parallax" effect have been really popular.
In case you have not heard of this effect, it basically includes different layers of images that are moving in different directions or with different speed. This leads to a...
Providing users as many preferences as possible always puts a smile on the user's face. One of those important preferences is font size. I can see fine but the next guy may have difficulty with the font size I choose. That's why...