Return the number of balls on the screen

 avatar
unknown
javascript
a year ago
200 B
7
Indexable
function getNumberOfBalls(): number {
    // let's say the balls are stored in bubbleGame.gridContainer.children
    const balls = window.bubbleGame.gridContainer.children;
    return balls.length;
}
Editor is loading...
Leave a Comment