title: how to call or run the function in JavaScript every time when we resize the window?
body: <p>First of all thanks for reading my question.</p>
  <p>I want to know that how can I call the function in the javascript each time I resize my window.</p>
  <pre><code>window.('resize', function(){
      thsis()
  
      console.log('it runs')
  
  })
  
  function thsis(){
      console.log('this ')
  }
  </code></pre>
  <p>This code doesn't works for me by the console {console.log('it runs')
  statement works with this but not which is in the function
  I hope that you will solve my problem.</p>