Skip to content

Instantly share code, notes, and snippets.

@fredericAerts
Created January 19, 2016 18:33
Show Gist options
  • Save fredericAerts/0e938552dc99dd2acff6 to your computer and use it in GitHub Desktop.
Save fredericAerts/0e938552dc99dd2acff6 to your computer and use it in GitHub Desktop.
web developer in 3 days - v4
var myVariable = 'Hello';
var nameArray = ['Tom', 'Sara', 'Bob'];
var greetFunction = function(names) {
names.forEach(function(name) {
var greeting = myVariable + ' ' + name;
window.alert(greeting);
});
}
greetFunction(nameArray);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment