jQueryJavaScript error - missing ; before statement
<p>I was using this statement in my code to cache the jquery selector and this was causing an error in the console. The error was <code>"Missing ; before statement"</code></p>

<pre><code>var $medium-image-holder = $('#image_'+itemID_value);
</code></pre>

<p>where <code>itemID_value</code> is a numeric value. This statement is inside a for loop</p>

<p>Out of curiosity and after trying various tricks to overcome this thing, I replaced the hyphen with underscore in the variable name.</p>

<pre><code>var $medium_image_holder = $('#image_'+itemID_value);
</code></pre>

<p>Surprisingly this worked.</p>

<p>I want to know whether using hyphens in JavaScript variable names is not permitted. At least, I didn't know about this. Would be very helpful if someone clarifies.</p>
