js if else
If - Else Statements
if (condition) {
// what to do if condition is met
} else {
// what to do if condition is not met
}
js if else
If - Else Statements
if (condition) {
// what to do if condition is met
} else {
// what to do if condition is not met
}
if statement
if( name = 'george washington'):
print("You have the same name as the first president of the United States")
// python
else:
print("You do not have the same name as George Washington")
how to use if else statement in javascript
var condition = true; // An example condition for true/false conditions
if (condition == true) {
console.log('condition is true');
} else {
console.log('condition is not true');
} // Console will output 'condition is true'
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us