Last active
December 9, 2016 23:53
-
-
Save DingWeizhe/93ad4b851ef0149879fef942dae8246f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 安永金融科技 | |
// 公司地址 : 中山北路三段22號 | |
// 聯絡電話 : 0983-010-978 (丁先生) | |
// 10:00 - 19:00 | |
function AnyongFindFrontEndEngineer (peoples){ | |
let SPA = "Single Page Application"; | |
let skillWeights = [ | |
["ChatBot", 1], | |
["AngulerJS", 1], | |
["ng2", 2], | |
["ts", 2], | |
["pug", 2], | |
["English", 2], | |
["scss", 2] | |
]; | |
let caleSkillWeight = people => skillWeights.reduce((prev, curr) => prev + (people.hasSkill(curr[0]) ? curr[1] : 0), 0); | |
let frontEndEngineers = peoples.filter(p => | |
p.isUnemployed && | |
p.hasSkill([SPA, "html5", "css3", "js"]) && | |
_.inRange(p.expectedSalary, 40000, 60000) | |
).sort((a, b) => caleSkillWeight(a) - caleSkillWeight(b)); | |
return frontEndEngineers[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment