I have the below Java code which I need to convert to Swift. First one is simply initializing a 2D array with a number of rows and columns.
double[][] VAR1 = new double[5][10];
Second one is initializing a 2D array with some initial values.
double[][] VAR2 = new double[][]{ {2.1, 4.3}, {5.4, 8.9},};
I can't figure out how to do the first one.
But I have a shot at the second one. Not sure if it's correct though.
var var2: [[Double]] = [[2.1], [4.3], [5.4], [8.9]]