js-mentorship-razvan / javascript

Javascript study notes
GNU General Public License v3.0
22 stars 2 forks source link

Job Matching #1 #602

Closed RazvanBugoi closed 2 years ago

RazvanBugoi commented 2 years ago

https://www.codewars.com/kata/56c22c5ae8b139416c00175d/train/javascript

RazvanBugoi commented 2 years ago
function match(candidate, job) {
  if (candidate.minSalary && job.maxSalary) {
    return candidate.minSalary * 0.90 <= job.maxSalary
  } else 
    throw "You don't have all the necessary parameters to do the calculation"
}