Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Conditional-structures/Wren/conditional-structures.wren
Normal file
18
Task/Conditional-structures/Wren/conditional-structures.wren
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
for (b in [true, false]) {
|
||||
if (b) {
|
||||
System.print(true)
|
||||
} else {
|
||||
System.print(false)
|
||||
}
|
||||
|
||||
// equivalent code using ternary operator
|
||||
System.print(b ? true : false)
|
||||
|
||||
// equivalent code using && operator
|
||||
System.print(b && true)
|
||||
|
||||
// equivalent code using || operator
|
||||
System.print(b || false)
|
||||
|
||||
System.print()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue