title: How to find class name or id name of any element on a page?
body: <p>I want to get the name of id and class of any element and if it does not have any id or class then it should return null.</p>
  
  <pre><code>document.addEventListener('click',function(ele){
  });
  </code></pre>
  
  <p>I have used this code to get the element clicked by the user.</p>
  
  <p>How to get the id or class name if present using this "ele" element ?</p>