title: Comparing whether a unicode equals something
body: <p>I'd like to add some logic to my code along the lines of:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var X = $('span').text()
  $('body').append(X)
  
  if (X == '&amp;#9660;') {
    $('body').append('Yay!')
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;span&gt;&amp;#9660;&lt;/span&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>However, as you can see from the above snippet, "Yay!" isn't appended to the body. So how can I check if a unicode character equals an escape sequence?</p>