title: combine load and resize plain JavaScript
body: <p>I combine the load en the resize function in one. </p>
  
  <pre><code>$(window).on("resize", function () {
      if (window.innerWidth &lt; 700) {
          alert('hello');
      }
  }).resize();
  </code></pre>
  
  <p>But I am looking for a code in plain JavaScript (without jQuery).</p>
  
  <p>How can I create this?</p>