Another quicky for you clever people
I have writen this function but I think I have it wrong.
It is supposed to prompt for a number between 1 and 3 and then alert if they enter anything else other than 1 2 or 3.
This is what I have got and it works to a fashion (1980's hairstylee wrong fashion that is) anyone help?
code:
function getChosenNumber()
{
numberChosen=
window.prompt('Player ' + currentPlayer + ' please choose a number between 1 and 3.','');
if (numberChosen > 3)
{
alert('please chose a number between 1 and 3');
}
return numberChosen
}