🌈 搜索
📅  最后修改于: 2022-03-11 15:04:46.244000             🧑  作者: Mango
p array.map { |x| x == 4 ? 'Z' : x } # => [1, 2, 3, 'Z']