not-zero

try-catch
Author

jim

Published

May 22, 2021

I knew that 0 becomes FALSE, when logical is required.

Code
if(0) print("FALSE")

And I knew that 1 becomes TRUE

Code
if(1) print("TRUE")
....-> [1] "TRUE"

But I did not know:

Code
if(!0) print("TRUE")
....-> [1] "TRUE"