Skip to content

Commit 04bafd5

Browse files
code added
1 parent 9be46f6 commit 04bafd5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Conditional-ternary-operator.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Work same as if else condition but a little bit different from that like in conditional ternary we cannot write more than one conditions and there
2+
// syntax are totally different.
3+
4+
let today = "Monday";
5+
let className;
6+
className = "Yes it is" + " " + (today === "Monday" ? "True" : "False") + " today is game class";
7+
console.log(className);

0 commit comments

Comments
 (0)