using if statements in javascript
if (expression) {
Statement(s) to be executed if expression is true
} else {
Statement(s) to be executed if expression is false
}
using if statements in javascript
if (expression) {
Statement(s) to be executed if expression is true
} else {
Statement(s) to be executed if expression is false
}
if statement
if( ID = josh ):
print("ID confirmed")
// python
else:
print("ID does not exist")
if () { }
var price = 500;
var money = 100;
if (price > money) {
console.log("Not Enough")
} else {
console.log("Can Buy")
}
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")
javascript if
const number = (Math.random() - 2.5) * 5;
if (number < 0) {
console.log('Number is negative');
}
if (number = 0) {
console.log('Number is zero');
}
if (number > 0) {
console.log('Number is positive');
}
if () { }
var price = 500;
var money = 100;
if (price > money) {
console.log("Not Enough");
} else {
console.log("Can Buy");
}
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