Skip to content

Instantly share code, notes, and snippets.

@MohamedRajabMohammed
Created July 22, 2020 00:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MohamedRajabMohammed/2cfda89bcbe4465f6db10b5121ae4c5b to your computer and use it in GitHub Desktop.
Save MohamedRajabMohammed/2cfda89bcbe4465f6db10b5121ae4c5b to your computer and use it in GitHub Desktop.
Variables
// grab parts of our HTML
const countdownArea = document.querySelector('.countdown');
const numbersArea = document.querySelector('.numbers');
const resetBtn = document.querySelector('.reset');
// create an interval and counter
let interval;
let count = 0;
// calculate the height of our numbers
const height = countdownArea.getBoundingClientRect().height;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment