title: Variable value shown in console is inconsistent with equality test
body: <p>given the following:
  where <code>data</code> is a string received as an AJAX value and data has a value of 'good':</p>
  
  <pre><code>console.log data          # good
  console.log typeof data   # string
  console.log typeof 'data' # string
  
  if data is 'good'
    console.log 'test' # NOTHING!!!
  </code></pre>
  
  <p>I don't understand...</p>
  
  <p>makes me want the good ol' JavaScript back...</p>
  
  <p>A more complete example after a suggestion:</p>
  
  <p>The following does not work either...</p>
  
  <pre><code>  $('#profile_slug').keyup(()-&gt;
      if $(this).val() != original_slug
        value = encodeURIComponent $(this).val()
        console.log value
        $.get('/live_validate/slug?slug='+value, (data)-&gt;
  
          console.log data
          console.log typeof data
          console.log typeof 'data'
  
          `
          if (data == 'good') {
            console.log('test');
          }
  
         `
  </code></pre>
  
  <h3>update 2</h3>
  
  <p>oddly enough: </p>
  
  <pre><code>console.dir data
  console.dir 'good'
  
  good
  No Properties
  
  good
  No Properties
  </code></pre>
  
  <h3>update 3</h3>
  
  <p><em>controller</em></p>
  
  <pre><code>  if @slug.nil?
      @message = "good"
    else
      @message = "bad"
    end
  </code></pre>
  
  <p><em>view</em></p>
  
  <pre><code>!= @message
  </code></pre>
  
  <p><em>coffeescript</em></p>
  
  <pre><code>new_data = data.replace /^\s+|\s+$/g, ""
  </code></pre>
  
  <p><em>result</em> </p>
  
  <p>same sh*t.</p>
  
  <h2>update 4 + answer</h2>
  
  <p>This code ended up being what I needed, at first it didn't work quite well with everything else I had going on, but it is the final piece in the puzzle, allowing me to make sure there are no invisible spaces before or after the received string.</p>
  
  <pre><code>    $.get('/live_validate/slug?slug='+value, (data)-&gt;
          # console.log data
  
          stripped_data = data.replace /^\s+|\s+$/g, ""
  
          # console.log encodeURIComponent data
          # console.log (data.charCodeAt(i) for i in [0...data.length])       
  
  
          if stripped_data is 'good'
            $('#profile_slug').addClass('valid-field')
            $('#profile_slug').removeClass('invalid-field')
          else if stripped_data is 'bad'
            $('#profile_slug').addClass('invalid-field')
            $('#profile_slug').removeClass('valid-field')
  </code></pre>