Here's an example of the if statement:
if(username == 'Jim') { alert('Hello Jim'); }
If username has the value Jim, the user will see the message Hello Jim.
Next: The 'else if' Statement
Leave a comment