ACE in Action
const newTechnology = undefined; const neededSkills = [ "React-Native", "ReactJS", "nodeJS", "C#", ".NET", "ObjC", "Swift", "iOS", "Java", "Android", "SQL", "PostgreSQL", "Linux", "Embedded Systems", ]; const areaOfWork = [ "mobile apps", "wild solutions with ties into the space-, aviation and travel industry", ] function theRightOne(person) { if( person.isProgrammer() && person.excitedAbout(newTechnology) ) { const likesApps = person.loves.includes(areaOfWork[0]); const isWildling = person.loves.includes(areaOfWork[1]); const relevantSkills = person.skillSet.reduce( (relevantSkills, skill) => { if(neededSkills.includes(skill)) { relevantSkills.push(skill) } return relevantSkills; }, [] ) if( likesApps && isWildling && relevantSkills.length >= 5 ) { return person.email; } return "Too bad."; } } const you = { }; console.log(theRightOne(you));