Using the JavaScript if statement