Created
January 19, 2016 18:33
-
-
Save fredericAerts/0e938552dc99dd2acff6 to your computer and use it in GitHub Desktop.
web developer in 3 days - v4
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
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