Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rails .map unless nil

[1, nil, 3, nil, nil].compact
=> [1, 3] 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rails #nil
ADD COMMENT
Topic
Name
4+5 =