Returns the first not nil element in the given array, or null if all elements are nil
Optional
the array to check
the first not nil element in the given array, or null if all elements are nil
firstNotNil([null, undefined, 'foo', 'bar', {}]); // 'foo' Copy
firstNotNil([null, undefined, 'foo', 'bar', {}]); // 'foo'
Returns the first not nil element in the given array, or null if all elements are nil