what's the meaning of the function?
<pre><code>function hasClass( elem, cls ) {
var reClass = new RegExp(' ' + cls + ' ');
return reClass.test(' ' + elem.className + ' ');
}
</code></pre>

<p>i am a new learner of javascript, i saw the above function from a book.but i don't what's the meaning of it? expect someone can explain it to me.many thanks.</p>
