Toggle navigation
Home
Learn
Discuss
GO
Signup
Login
Upvotes
Anonymous 0
User 0
Member votes
Anonymous votes
The 'if' Statement in JavaScript
By jasonj
Feb 2, 2015 06:31
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
Was this helpful?
vote up
Thanks! Your feedback is appreciated.
Tags
Beginner
Conditional Statements
JavaScript
Comments
Leave a Comment
Submit
I agree to the
Terms of Service
Success!
We'll review your submission and post it to this page.
Share your discussion on Twitter!
Tweet
Most Popular
Simple VIM Reference
STComboBox: A Lightweight jQuery Combo Box
How to Install Spacemacs on Windows
Spacemacs Tutorials
Spacemacs (Vim mode) Cheatsheet
How to setup a project in Spacemacs
How to Create an Executable from Python 3 Code using py2exe
Stay Connected
Submit
Be the first to find out about new articles, promotions, and exclusive lessons.
Success! We're cooking up an email for you right now.
Topics
CherryPy
Chromium Embedded Framework
CSS
Git
HTML
JavaScript
jQuery
Python
Spacemacs
VueJS
Questions? Want to get in touch?
Recent Posts
How to debug Python code using PDB++
VueJS
How to resolve "Undeclared variable or function 'module'" error thrown by js2-mode in Spacemacs
Spacemacs (Vim mode) Cheatsheet
Spacemacs Tutorials
How to install Exuberant Ctags on Ubuntu 14
How to edit your Projectile projects list in Spacemacs on Windows
Thank you.
remove vote
Your vote has been removed.
Advertise with Us
Contact
Terms of Use
Design © 2015, Downranked, LLC.,
Original user code contributions under MIT License
Comments
Leave a Comment
We'll review your submission and post it to this page.