text: const { NotImplementedError } = require('../extensions/index.js');
  
  /**
   * Create name of dream team based on the names of its members
   *  
   * @param {Array} members names of the members 
   * @return {String | Boolean} name of the team or false
   * in case of incorrect members
   *
   * @example
   * 
   * createDreamTeam(['Matt', 'Ann', 'Dmitry', 'Max']) => 'ADMM'
   * createDreamTeam(['Olivia', 1111, 'Lily', 'Oscar', true, null]) => 'LOO'
   *
   */
  function createDreamTeam(members) {
    //throw new NotImplementedError('Not implemented');
    if(!Array.isArray(members)) {
      return false
    }
    let result = [];
    for (let value of members) {
      if (typeof(value) === 'string'){
        //console.log(value.trim())
        result.push(value.trim()[0].toUpperCase());
      }
    }
    return result.length === 0? false: result.sort().join('');
  }
  
  module.exports = {
    createDreamTeam
  };
  