_render(dataArr, time = 'weekly') {
    while (this._parentContainer.childNodes.length > 2)
      this._parentContainer.removeChild(this._parentContainer.lastChild);

    dataArr.forEach(data => {
      const specificTime = data.timeframes[time];
      const markup = this._generateMarkup(data, specificTime);
      this._parentContainer.insertAdjacentHTML('beforeend', markup);
    });

    document.querySelector(`[data-format="${time}"]`).classList.add('active');
  }
/*
    render the data on the page
    1) @param time = 'weekly' is default in the event of page loading
    2) remove all elements from the page except the static controller card
    3) getting the markup and adding it to the parent element
    4) making the clicked buttton active
  */
render the data on the page
1) @param time = 'weekly' is default in the event of page loading
2) remove all elements from the page except the static controller card
3) getting the markup and adding it to the parent element
4) making the clicked buttton active
render the data on the page 1 ) @param time = ' weekly ' is default in the event of page loading 2 ) remove all elements from the page except the static controller card 3 ) getting the markup and adding it to the parent element 4 ) making the clicked buttton active
_render(dataArr, time = 'weekly') {
    while (this._parentContainer.childNodes.length > 2)
      this._parentContainer.removeChild(this._parentContainer.lastChild);
    dataArr.forEach(data => {
      const specificTime = data.timeframes[time];
      const markup = this._generateMarkup(data, specificTime);
      this._parentContainer.insertAdjacentHTML('beforeend', markup);
    });
    document.querySelector(`[data-format="${time}"]`).classList.add('active');
  }
_render ( dataArr , time = 'weekly' ) { while ( this . _parentContainer . childNodes . length > 2 ) this . _parentContainer . removeChild ( this . _parentContainer . lastChild ) ; dataArr . forEach ( data => { const specificTime = data . timeframes [ time ] ; const markup = this . _generateMarkup ( data , specificTime ) ; this . _parentContainer . insertAdjacentHTML ( 'beforeend' , markup ) ; } ) ; document . querySelector ( ` ${ time } ` ) . classList . add ( 'active' ) ; }
render the data on the page
1) @param time = 'weekly' is default in the event of page loading
2) remove all elements from the page except the static controller card
3) getting the markup and adding it to the parent element
4) making the clicked buttton active
render the data on the page 1 ) @param time = ' weekly ' is default in the event of page loading 2 ) remove all elements from the page except the static controller card 3 ) getting the markup and adding it to the parent element 4 ) making the clicked buttton active