- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathifstatements.js
More file actions
Latest commit
21 lines (21 loc) · 510 Bytes
/
Copy pathifstatements.js
File metadata and controls
21 lines (21 loc) · 510 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
constmen=["Socrates","Brutus","Chris","Bob"];
constallmenmortal=true;
if(allmenmortal)
{
console.log("All men are mortal");
for(i=0;i<=men.length;i++)
if(men[i]==="Socrates"){
console.log("Socrates is a man ");
console.log("Therefore,Socrates is Mortal");
}
}
varcake="vanilla";
if(cake==="vanilla"||"chocolate")
{
console.log("This cake is either Vanilla or chocolate");
if(cake!="chocolate")
{
console.log("This cake is not chocolate");
console.log("Therefore,this cake is vanilla");
}
}