Sure, here's an example of a playable game where you have to make a basket with a basketball using JavaScript and HTML:
You can copy and paste this code into a single HTML file and open it in your browser to play the game. Press the Spacebar to release the basketball and try to make it into the basket at the bottom. Once you make the basket, the game will display a success message.