Skip to content

Commit 67be65b

Browse files
committed
add some lesson
1 parent 9fe57cb commit 67be65b

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

04_if-statement/index.html

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,35 @@
3434
}
3535

3636
const cartQuantity = 5;
37-
if(cartQuantity)
37+
if(cartQuantity);
3838
{
39-
console.log('cart has product')
39+
console.log('cart has product');
4040
}
4141

42+
console.log(!0);
4243

44+
console.log('text'/5);
45+
46+
let variable1;
47+
console.log(variable1);
48+
49+
50+
// Ternary operator
51+
52+
const result=true ? 'truthy' :
53+
'falsy'
54+
console.log(result)
55+
56+
// guard operator
57+
58+
false && console.log('ayush')
59+
60+
// default operator
61+
62+
const currency ='INR'|| 'USD'
63+
console.log(currency)
64+
65+
4366
</script>
4467

4568
</body>

0 commit comments

Comments
 (0)