Skip to content

Commit 23a73a2

Browse files
committed
add one more example
1 parent 2621187 commit 23a73a2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

explicit-and-implicit-conversion-in-javascript.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,8 @@ console.log("The fantastical fruit total is " + sumFruit);
4545

4646
let sum = 30 + "2";
4747
console.log(sum);//returns 302 because 30 was implicitly converted to a string and added to the string "2".
48+
49+
//example with edge case:
50+
51+
let example = Boolean(null);//since "null" is in the Boolean it automatically is false because "null" is falsy.
52+
console.log(example);

0 commit comments

Comments
 (0)