Created
December 27, 2014 16:09
-
-
Save why-jay/97b9c4ff5e58fae136ef to your computer and use it in GitHub Desktop.
This file contains hidden or 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 filterNamesContaining(someStr, names) { | |
let rtn = []; | |
for (let name of names) { | |
if (name.indexOf(someStr) !== -1) { rtn.push(name); } | |
} | |
return rtn; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment