a4rqrg
Last Updated: December 22, 2017
·
416
· krmbzds
Krmbzds

Check If An Array Consists of Integers

[1, 2, 3, 4, 5].all? {|i| i.is_a?(Integer) }  #=> True
JSON.parse("[1,2,3,4]").all? {|i| i.is_a?(Integer) }  #=> True
Say Thanks
Respond