Javascript




Write a simple Javascript game with the following features. This game is based on the game with three cups with a ball hidden under one of them. The user interface should show : -Three cups -A “Mix Up Cups” button. -Something showing the current points balance. Once the user clicks the button the Javascript program should randomly decide which cup the ball will be under. The user will then be prompted to click on the cup which they think the ball is under. If they are correct they get a point, if they are incorrect they lose a point. They should be informed whether their guess was correct and there should be something on the page to indicate their current points balance. Their starting points balance should be 3. If they drop to zero at any stage the game is over