Why this is not Working in Javascript
<pre><code>.......
........

key1 = 'start' + i + '';
key2 = 'end' + i + '';
datePass.push({
    key1: start,
    key2: end
});
</code></pre>

<p>it returns </p>

<pre><code>[{key1 : `somevalue`, key1: 'somevalue'}]
</code></pre>

<p>but i want </p>

<pre><code>[{start1 : `somevalue`, end1: 'somevalue'}]
</code></pre>

<p>and so on.</p>

<p>How can i do so. pleas help.</p>
