text: "use strict";
  
  const refs = {
    days: document.querySelector('[data-value="days"]'),
    hours: document.querySelector('[data-value="hours"]'),
    mins: document.querySelector('[data-value="mins"]'),
    secs: document.querySelector('[data-value="secs"]')
  };
  
  class CountdownTimer {
    constructor({selector, targetDate}) {
      this.selector = selector;
      this.targetDate = targetDate;
    }
  
    updateTimer() {
      setInterval(() => {
        let time = Date.parse(this.targetDate) - Date.now();
        const days = Math.floor(time / (1000 * 60 * 60 * 24));
        const hours = Math.floor(
          (time % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
        );
        const mins = Math.floor((time % (1000 * 60 * 60)) / (1000 * 60));
        const secs = Math.floor((time % (1000 * 60)) / 1000);
        refs.days.textContent = `${days}`;
        refs.hours.textContent = `${hours}`;
        refs.mins.textContent = `${mins}`;
        refs.secs.textContent = `${secs}`;
      }, 1000);
    }
  }
  
  const timer = new CountdownTimer({
    selector: "#timer-1",
    targetDate: new Date("Jul 17, 2020")
  });
  
  timer.updateTimer();
  