/em>: if we had cleared random_data via: <code>random_data = []</code>
in the <code>generate_data()</code> function, then this wouldn’t work.  It would just have updated the
variable and not the array that the charts are working with.  That’s why <code>random_data.length=0</code> is used.</p>

            </div>
            
            <div class="content"><div class='highlight'><pre>$(<span class="hljs-string">&#x27;#sync_generate_button&#x27;</span>).on(<span class="hljs-string">&#x27;click&#x27;</sp