Skip to content

T

Summary

True if x is logical true (i.e. neither nil nor false).

Examples

1
2
3
4
5
6
7
8
9
T(true);      //=> true
T([]);        //=> true
T(42);        //=> true
T(0);         //=> true
T('');        //=> true
T(NaN);       //=> true
T(null);      //=> false
T(undefined); //=> false
T(false);     //=> false

Parameters

Name Type Description
x ?

Return

boolean