Created if/else statements with JavaScript