Write a function nestedArrayCheck
that takes an input and returns a
string indicating whether the input
is an array or a nested array,
and
if nested, how many levels of nesting
it contains.
- If the input is a non-array value, return "Input is not an array".
- If the input is a single-dimensional array, return "Input is an array".
- If the input is a nested array, return "Input is a nested array with X levels", where X is the number of levels of nesting.
For example: