Make null falsey.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Evaluate the 'then' expression if the condition is true.
|
||||
if (true) IO.print("good") // expect: good
|
||||
if (false) IO.print("bad")
|
||||
|
||||
// Allow block body.
|
||||
if (true) { IO.print("block") } // expect: block
|
||||
|
||||
// Assignment in if condition.
|
||||
var a = false
|
||||
if (a = true) IO.print(a) // expect: true
|
||||
|
||||
// Newline after "if".
|
||||
if
|
||||
(true) IO.print("good") // expect: good
|
||||
Reference in New Issue
Block a user