| 1 | // Welcome to code screenshot |
| 2 | function greet(name: string): string { |
| 3 | const greeting = `Hello, ${name}!`; |
| 4 | console.log(greeting); |
| 5 | return greeting; |
| 6 | } |
| 7 | |
| 8 | const names = ["World", "Developer", "fatcousin"]; |
| 9 | names.forEach((name) => greet(name)); |