title: How can I check if a var is a string in JavaScript?
body: <p>How can I check if a var is a string in JavaScript?</p>
  
  <p>I've tried this and it doesn't work...</p>
  
  <pre><code>var a_string = "Hello, I'm a string.";
  
  if (a_string typeof 'string') {
      // this is a string
  }
  </code></pre>