function(line) {
  const length = getLength(line);
  let output;
  if (length > 100) {
    output = (Math.round(length / 1000 * 100) / 100) +
        ' ' + 'km';
  } else {
    output = (Math.round(length * 100) / 100) +
        ' ' + 'm';
  }
  return output;
}
function(line) {
  const length = getLength(line);
  let output;
  if (length > 100) {
    output = (Math.round(length / 1000 * 100) / 100) +
        ' ' + 'km';
  } else {
    output = (Math.round(length * 100) / 100) +
        ' ' + 'm';
  }
  return output;
}
function ( line ) { const length = getLength ( line ) ; let output ; if ( length > 100 ) { output = ( Math . round ( length / 1000 * 100 ) / 100 ) + ' ' + 'km' ; } else { output = ( Math . round ( length * 100 ) / 100 ) + ' ' + 'm' ; } return output ; }
global so we can remove it later 
Format length output.
@param {LineString} line The line.
@return {string} The formatted length.
global so we can remove it later Format length output .
get the term length of a term