New empty() Expression Function

The empty(v.attributeName) function returns true if the argument is empty.

This function works for arguments of type String, Array, Object, List, Map, or Set.

An empty argument is undefined, null, an empty array, or an empty string. An object with no properties is not considered empty.


{! !empty(v.myArray)} evaluates faster than {!v.myArray && v.myArray.length > 0} so we recommend empty() to improve performance.