Skip to content

Instantly share code, notes, and snippets.

@devotdev
Created December 18, 2024 09:29
Show Gist options
  • Select an option

  • Save devotdev/28690b766b7b017e436d76110e8f90f8 to your computer and use it in GitHub Desktop.

Select an option

Save devotdev/28690b766b7b017e436d76110e8f90f8 to your computer and use it in GitHub Desktop.
Batch processing example
const printGreetings = function(names) {
names.forEach(name => console.log(`Hello, ${name}!`));
}
printGreetings(["John", "Jane", "Michael"]);
// Output:
// Hello, John!
// Hello, Jane!
// Hello, Michael!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment