How long is a piece of $string… too long… javascript P2
<p>How can I convert this PHP code to JavaScript?</p>

<pre><code>$string = "string How Long is a Piece of String?";

if (strlen($string) &lt; 5)
{
   echo "string is less than 5";
}
else
{
   echo "string is more than 5";
}
</code></pre>
