Using if and else statements to create a conditional with alerts and prompts