1If - Else Statements
2if (condition) {
3// what to do if condition is met
4} else {
5// what to do if condition is not met
6}
7
1if( name = 'george washington'):
2 print("You have the same name as the first president of the United States")
3 // python
4else:
5 print("You do not have the same name as George Washington")
1var condition = true; // An example condition for true/false conditions
2
3if (condition == true) {
4 console.log('condition is true');
5} else {
6 console.log('condition is not true');
7} // Console will output 'condition is true'