StackOverflow 文档 Ruby Language 教程 多维数组 初始化 3D 数组 初始化 3D 数组 Created: November-22, 2018 你可以进一步向下并添加第三层阵列。规则不会改变: my_array = [ [ [1, 1, 2, 3, 5, 8, 13], [1, 4, 9, 16, 25, 36, 49, 64, 81], [2, 3, 5, 7, 11, 13, 17] ], [ ['a', 'b', 'c', 'd', 'e'], ['z', 'y', 'x', 'w', 'v'] ], [ [] ] ] 访问嵌套数组初始化 2D 数组