10 lines
158 B
Ruby
Executable File
10 lines
158 B
Ruby
Executable File
#!/usr/bin/ruby
|
|
# -*- coding: utf-8 -*-
|
|
|
|
=begin
|
|
select로 조건에 맞는 값 필터링
|
|
=end
|
|
|
|
array = [2, 3, 5, 7, 9]
|
|
|
|
puts array.select { |item| item.odd? } |