Are dashes allowed in javascript variable names?
<p>I was looking at <a href="http://docs.jquery.com/Plugins/Authoring#Defaults_and_Options" rel="nofollow">http://docs.jquery.com/Plugins/Authoring#Defaults_and_Options</a> to create a simple plugin for jQuery. Following the section about options and settings, I did the following, which didn't work (the script quit when it encountered the setting).</p>

<pre><code>var settings = {
    'location' : 'top',
    'background-color': 'blue'
}
...
$this.css('backgroundColor', settings.background-color); // fails here
</code></pre>

<p>Once I removed the dash from the background color, things work properly. </p>

<pre><code>var settings = {
    'location' : 'top',
    'backgroundColor': 'blue' // dash removed here
}
...
$this.css('backgroundColor', settings.backgroundColor); 
</code></pre>

<p>Am I missing something, or are the jQuery docs wrong?</p>
