Skip to content

Instantly share code, notes, and snippets.

@zeptobook
Created December 30, 2018 00:14
Show Gist options
  • Save zeptobook/7683490ed92ddb0c157b07817c04ded0 to your computer and use it in GitHub Desktop.
Save zeptobook/7683490ed92ddb0c157b07817c04ded0 to your computer and use it in GitHub Desktop.
Array.forEach()
var prntVal = "";
var names = ['Frank', 'Charles', 'Dolly', 'Robert', 'Bob'];
names.forEach(function(value){
prntVal = prntVal + 'Hello '+ value +"<br/>";
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment