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 & empty element in array
[nil, 'apple', 'orange', '', 'banana'].reject(&:blank?) => ["apple", "orange", "banana"]
Source by rubysnippets.net #
PREVIOUS
NEXT
Tagged:
#ruby
#remove
#nil
#empty
#element
#array
ADD COMMENT
Topic
COMMENT
Name
2+2 =
Submit