@oazmi/kitchensink - v0.9.13
    Preparing search index...

    Variable shapeOfArray2DConst

    shapeOfArray2D: ShapeOfArray2D_Signatures = ...

    get the shape of a 2d array as a 2-tuple describing the major-axis's length, and the minor-axis's length.

    import { assertEquals } from "jsr:@std/assert"

    const arr2d: Array2DRowMajor<number> = [
    [1 , 2 , 3 , 4 , 5 ],
    [6 , 7 , 8 , 9 , 10],
    [11, 12, 13, 14, 15],
    ]
    const [rows, cols] = shapeOfArray2D(arr2d)
    assertEquals(rows, 3)
    assertEquals(cols, 5)