DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR RUBY
ruby remove nil element in array
[nil, 'apple', 'orange', '', 'banana'].compact => ["apple", "orange", "", "banana"]
Source by rubysnippets.net #
PREVIOUS
NEXT
Tagged:
#ruby
#remove
#nil
#element
#array
ADD COMMENT
Topic
COMMENT
Name
1+4 =
Submit