When i press 1 to go to "Start" it runs start BUT it also runs "instructions". So after it says "Welcoe22222" it would say "HAHAHAH" right after it but i only want the "start" function.
<script type="text/javascript">
alert("Welcome to the BattleShip Game!!!")
name = prompt("What is your name: ")
alert("Welcome "+name)
option = prompt("1. Start Game \n \n 2. Instructions \n \n Select: ")
if (option ==1)
start()
else (option ==2)
instructions()
function start() {
alert("Welcoe22222")
}
function instructions() {
alert("HAHAHAH")
}
</script>