Created
October 24, 2016 22:20
-
-
Save AmaxJ/e4551b19db7f2e646f68657e6ac70b6e 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
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