Skip to content

Instantly share code, notes, and snippets.

@mdorrance
Last active October 13, 2015 15:33
Show Gist options
  • Save mdorrance/894b3f06d79a211184d0 to your computer and use it in GitHub Desktop.
Save mdorrance/894b3f06d79a211184d0 to your computer and use it in GitHub Desktop.
Echo Challenge
function logElements(element) {
console.log(element)
}
function echo(x) {
x.forEach(logElements)
}
// dynamic answer for any input
function echo(array) {
for(var i= 0; i < arguments.length; i++) {
console.log(arguments[i]);
}
}
echo(["Mike", "max", "tim"]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment