title: How to Convert event object to string in JavaScript?
body: <p>I am trying to get which event is occured :: </p>
  
  <pre><code>function getEvent(){
      alert(window.event);
  }
  </code></pre>
  
  <p>I am getting below event object. I want it in string to compare. if event onclick event then I want to do the action. how can I get it in string? or how can I convert event object to string?</p>
  
  <pre><code>[object MouseEvent]
  </code></pre>