title: if charAt equal to a list of characters
body: <p>I want something like the following in Javascript</p>
  
  <p>if str.charAt(index) (is in the set of) {".", ",", "#", "$", ";", ":"}</p>
  
  <p>Yes, I know this must be simple, but I can't seem to get the syntax right. What I have now is</p>
  
  <pre><code>theChar = str.charAt(i);
  if ((theChar === '.') || (theChar === ',') || (theChar === ... )) {
    // do stuff
  }
  </code></pre>
  
  <p>This works, but there must be a better way.</p>
  
  <p>Edit: I did this, but not sure if it's GOOD or not:</p>
  
  <pre><code>var punc = {
      ".":true,
      ",":true,
      ";":true,
      ":":true
  };
  
  if (punc[str.charAt[index]) { ...
  </code></pre>