Skip to content

Commit 5c3e269

Browse files
authored
Create truthy-falsy.js
1 parent 2dd8f06 commit 5c3e269

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

truthy-falsy.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// truthy & falsy
2+
console.log(Boolean(0));
3+
console.log(Boolean(undefined));
4+
console.log(Boolean(true));
5+
console.log(Boolean(false));
6+
7+
var money = 0;
8+
if( money=10){
9+
10+
console.log(`Don't spend all money`);
11+
}
12+
13+
else{
14+
console.log(`You should get a job `);
15+
}
16+
17+
let height ;
18+
if (height)
19+
{
20+
console.log(`Height is defined`);
21+
}
22+
else
23+
{
24+
console.log(`Height is not defined`);
25+
}

0 commit comments

Comments
 (0)