0

What is the syntax of if statement if we use 2 conditions

30th Sep 2018, 12:51 PM
MUHAMMAD ILYAS
MUHAMMAD ILYAS - avatar
4 Answers
0
which language?
30th Sep 2018, 1:17 PM
Ulisses Cruz
Ulisses Cruz - avatar
0
java script
30th Sep 2018, 1:18 PM
MUHAMMAD ILYAS
MUHAMMAD ILYAS - avatar
0
you can use: &&(AND) or ||(OR) Example: if (age > 18 && status === 'single') { console.log('You may enter'); } if (age > 18 || status === 'single') { console.log('Ok'); }
30th Sep 2018, 1:22 PM
Ulisses Cruz
Ulisses Cruz - avatar
0
thankx
1st Oct 2018, 6:10 AM
MUHAMMAD ILYAS
MUHAMMAD ILYAS - avatar