Javascript array error
<p>I am trying to make one array equal another array like so: <code>elementStyle[property] = styles[property];</code></p>

<p>But i keep getting a "invalid argument" error.</p>

<p>Any Ideas????</p>

<p>Addtional:</p>

<p>The code is on: <a href="http://prototypejs.org/assets/2009/8/31/prototype.js" rel="nofollow">http://prototypejs.org/assets/2009/8/31/prototype.js</a>. The area that i'm interested in is:</p>

<pre><code>setStyle: function(element, styles) {
  element = $(element);
  var elementStyle = element.style, match;
  if (Object.isString(styles)) {
    element.style.cssText += ';' + styles;
    return styles.include('opacity') ?
      element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
  }
  for (var property in styles)
    if (property == 'opacity') element.setOpacity(styles[property]);
    else
      elementStyle[(property == 'float' || property == 'cssFloat') ?
        (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
          property] = styles[property];

  return element;
},
</code></pre>

<p>This code is fine in Firefox and Chrome, but not in IE. I get an invalid argument error.</p>
