Skip to content

Instantly share code, notes, and snippets.

@AmaxJ
Created October 24, 2016 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AmaxJ/e4551b19db7f2e646f68657e6ac70b6e to your computer and use it in GitHub Desktop.
Save AmaxJ/e4551b19db7f2e646f68657e6ac70b6e to your computer and use it in GitHub Desktop.
function vacancies(arr) {
var vacancies = [];
for (var i=0; i < arr.length; i++) {
if (arr[i] === "vacancy") {
vacancies.push(arr[i]);
}
}
if (vacancies.length === 0) {
return "no vacancies";
}
return vacancies;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment