HOME

Javascript - Login function

Construct the attemptLogin function that reads in the username then the password from the two input boxes on a form.

Then it should check if the username is "Peppa" and the password is "cake"

If it is, it should then display "Welcome back Peppa" in a pop up and change the background to pink

Otherwise it should display "Incorrect login"

Construct a Javascript answer by drag&dropping and reordering lines from the left to the right.

Jumble the blocks! Try your code!