Any ideas to calculate min / max from array of strings?
var arr = ['aab','aac','aad','abx'];
So far i have considered to use .sort() function depending max / min, and get first element of result.
But maybe you know better preforming solution?
EDIT: Array size is below 1k elements. By Min /max i meant alphabetic sort: first and last element.
maxandminin this case?.localeCompare()could be used in a single pass.max / minone would assume is alpha sorted, first & last.