demo.js
function createCountUp() {
    establishOptionsFromInputs();
    demo = new CountUp('myTargetElement', endVal, options);
    if (!demo.error) {
      errorSection.style.display = 'none';
      if (input('useOnComplete').checked) {
        demo.start(methodToCallOnComplete);
      }
      else {
        demo.start();
      }
      updateCodeVisualizer();
    }
    else {
      errorSection.style.display = 'block';
      document.getElementById('error').innerHTML = demo.error;
      console.error(demo.error);
    }
  }
function createCountUp() {
    establishOptionsFromInputs();
    demo = new CountUp('myTargetElement', endVal, options);
    if (!demo.error) {
      errorSection.style.display = 'none';
      if (input('useOnComplete').checked) {
        demo.start(methodToCallOnComplete);
      }
      else {
        demo.start();
      }
      updateCodeVisualizer();
    }
    else {
      errorSection.style.display = 'block';
      document.getElementById('error').innerHTML = demo.error;
      console.error(demo.error);
    }
  }
function createCountUp ( ) { establishOptionsFromInputs ( ) ; demo = new CountUp ( 'myTargetElement' , endVal , options ) ; if ( ! demo . error ) { errorSection . style . display = 'none' ; if ( input ( 'useOnComplete' ) . checked ) { demo . start ( methodToCallOnComplete ) ; } else { demo . start ( ) ; } updateCodeVisualizer ( ) ; } else { errorSection . style . display = 'block' ; document . getElementById ( 'error' ) . innerHTML = demo . error ; console . error ( demo . error ) ; } }
COUNTUP AND CODE VISUALIZER
COUNTUP AND CODE VISUALIZER