Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Use Array#all? To Identify An Array Containing Nil

DZone's Guide to

Use Array#all? To Identify An Array Containing Nil

·
Free Resource
Determine if all items in an array are workable object using Array#all? e.g.

['cat', nil, 'bat', 'mat'].all?    #=> false
['cat', 'hat', 'bat', 'mat'].all?  #=> true


Resources:
 - Module: Enumerable [ruby-doc.org]
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}