Your browser does not support JavaScript!
Upvotes Anonymous 0 User 0

The 'if' Statement in JavaScript

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.
Was this helpful?

Comments

Leave a Comment

I agree to the Terms of Service
Design © 2015, Downranked, LLC.,
Original user code contributions under MIT License