title: How to write the jquery "is" method in javascript
body: <p>I wonder how I can write the jQuery is method using only javascript? </p>
  
  <p>You can't use any third party libraries. Only the javascript provided from the browser.</p>
  
  <p>FYI the method <code>is</code> in jQuery:</p>
  
  <blockquote>
    <p>Check the current matched set of elements against a selector, element,
    or jQuery object and return true if at least one of these elements
    matches the given arguments.</p>
  </blockquote>