javascript assignment

In the game of Nim, you have three piles of five stones. During each turn, each player can remove any number of stones from a single pile (a player cannot take stones from more than one pile). The player who removes the last stone from all of the heaps wins.Here is a sample game:Create a version of the game of Nim that you can play against the computer. Use a JavaScript prompt() to prompt the user to select a pile and number of stones to remove from the pile. For example, if the user enters a3 then you should remove 3 stones from Pile A. If the user enters c5 then 5 stones should be removed from Pile C.The computer should make smart decisions. For example, if the computer can win in a turn then the computer should make the winning move. Draw the current state of the piles after each turn.  Use console.log() to draw the piles:

READ ALSO :   Why did Napoleon Bonaparte assume control of France, and what factors led to his downfall