Scope Issue in JavaScript - Cannot Call add of Undefined...
<p>When i say... </p>

<p><code>table[i].add(deleteButton)</code> // this works... </p>

<p>// When i call inside an event listener... it's says cannot call add of undefined.</p>

<pre><code>imageLogo.addEventListener('click', function (e) {
        table[i].add(deleteButton);
    } else {
        imageLogo.backgroundImage = '/images/markHorizontal.png';
        table[i].remove(deleteButton);
    }
});
</code></pre>
