variable as element of method call in a loop
<p>I am trying to get the content from CKEDITOR for every div with the id change (change1, change2, ...)</p>

<pre><code>var data2= CKEDITOR.instances.change1.getData();
for (var i = 2; i &lt;= 30; i++){
if (typeof([\"CKEDITOR.instances.change\"+i]) != 'undefined') {
    var edit = CKEDITOR.instances.change[i].getData();
    data2 = data2 + '&lt;/div&gt;&lt;div class=\"d W1 h1\"&gt;' + edit;
}}
</code></pre>

<p>I've tried it like this but getting error:TypeError: CKEDITOR.instances.change is undefined at</p>

<pre><code>var edit = CKEDITOR.instances.change[i].getData();
</code></pre>
