-
Notifications
You must be signed in to change notification settings - Fork 0
getDimension
SuperPhantomUser edited this page Jun 11, 2021
·
1 revision
The getDimension method returns the dimension of the array.
Array types: 1d+
Returns: integer
Arguments:
- array
Examples:
const array = ["a", "b", "c", "d"];
console.log(Arrays.getDimension(array));
// Returns: 1const array = [
["a", "b", "c", "d"],
["e", "f", "g", "h"]
];
console.log(Arrays.getDimension(array));
// Returns: 2const array = [
[
["a", "b", "c", "d"],
["e", "f", "g", "h"]
],
[
["i", "j", "k", "l"],
["m", "n", "o", "p"]
]
];
console.log(Arrays.getDimension(array));
// Returns: 3