title: How to convert text to binary code in JavaScript?
body: <h1>Text to Binary Code</h1>
  <p><strong>I want JavaScript to translate text in a textarea into binary code.</strong></p>
  <p>For example, if a user types in &quot;<code>TEST</code>&quot; into the textarea, the value &quot;<code>01010100 01000101 01010011 01010100</code>&quot; should be returned.</p>
  <p>I would like to avoid using a switch statement to assign each character a binary code value (e.g. <code>case &quot;T&quot;: return &quot;01010100</code>) or any other similar technique.</p>
  <p>Here's a <a href="http://jsfiddle.net/fA24Y/" rel="noreferrer">JSFiddle</a> to show what I mean. Is this possible in native JavaScript?</p>