Return the number of balls on the screen

mail@pastecode.io avatar
unknown
javascript
12 days ago
200 B
3
Indexable
Never
function getNumberOfBalls(): number {
    // let's say the balls are stored in bubbleGame.gridContainer.children
    const balls = window.bubbleGame.gridContainer.children;
    return balls.length;
}
Leave a Comment