I suggest a function inside local scope. So, inside your application's/library's IIFE, do function clear(arr) { while(arr.length) arr.pop(); } , ... ... <看更多>
We start this learning activity by adding a new bubble to our array each time the user clicks. Then we limit the number of bubbles by removing the oldest ... ... <看更多>