If I have the following array:
array = ['a', 'abcde', 'ab'] ;
I would like to get the maximum length of the elements of the array, i.e. 5 (for the element 'abcde').
I know that you can get the length of an array element through (for example) the array [1] .length, but I don't know how to get the maximum length.
Any answer in javascript or jQuery would be great.
TIA
Paul jones
javascript jquery arrays
Paul jones
source share