Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Menu
Check for an Empty Array : empty « Array « Ruby
Ruby
Array
empty
Check for an Empty Array
x = [] puts
"x is empty"
if
x.empty?
Related examples in the same category
1.
Loop through an array until empty