Valid Mountain Array
Given an array of integers, return true if the array can be considered a mountain array, and false otherwise. A mountain array is defined as an array that:
Has a peak, which is an index such that all elements to the left of the peak are in strictly increasing order, and all elements to the right of the peak are in strictly decreasing order. The peak is not the first or the last element of the array.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)