title: Smooth vertical scrolling on mouse wheel in vanilla javascript?
body: <p>I am a huge fan for vanilla javascript, currently I am working on a project where I need to implement smooth scrolling on mouse wheel scroll. I want to implement this using vanilla JS. 
  I found a jQuery snippet on doing some research which go like below.</p>
  
  <pre><code>$(window).on('mousewheel DOMMouseScroll', function(e) {
     var dir,
     amt = 100;
  
     e.preventDefault();
     if(e.type === 'mousewheel') {
       dir = e.originalEvent.wheelDelta &gt; 0 ? '-=' : '+=';
     }
     else {
       dir = e.originalEvent.detail &lt; 0 ? '-=' : '+=';
     }      
  
     $('html, body').stop().animate({
       scrollTop: dir + amt
     },500, 'linear');
  });
  </code></pre>
  
  <p>Can anyone help me out as in how to implement a smooth scroll without using a helper library like jQuery or any other library.</p>
  
  <p>There are many implementations that people have done in jQuery. But I want a best implementation that one can do in vanilla JS. That can implemented anywhere in React, Angular &amp; Vue anywhere.</p>