📜  # 创建空的二维数组 - Ruby 代码示例

📅  最后修改于: 2022-03-11 15:04:49.059000             🧑  作者: Mango

代码示例1
# Create empty 2 dimensional array
x = 1
y = 2
two_dim = Array.new(x + 1) { Array.new(y + 1) }

p two_dim