function sortLen(array) {
  return array.sort((a, b) => {
    let x = a.length;
    let y = b.length;
    return ((x < y) ? -1 : ((x > y) ? 1 : 0));
  });
}
// Function to Sort Array by Length =============================
Function to Sort Array by Length
Function to Sort Array by Length
function sortLen(array) {
  return array.sort((a, b) => {
    let x = a.length;
    let y = b.length;
    return ((x < y) ? -1 : ((x > y) ? 1 : 0));
  });
}
function sortLen ( array ) { return array . sort ( ( a , b ) => { let x = a . length ; let y = b . length ; return ( ( x < y ) ? - 1 : ( ( x > y ) ? 1 : 0 ) ) ; } ) ; }
Function to Sort Array by Length
Function to Sort Array by Length