-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathq14.ts
More file actions
18 lines (14 loc) · 1.07 KB
/
q14.ts
File metadata and controls
18 lines (14 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Guest List: If you could invite anyone, living or deceased, to dinner, who would you invite? Make a list that includes at least three people you’d like to invite to dinner. Then use your list to print a message to each person, inviting them to dinner.
function example14() {
const name1: string | null = prompt("Enter name 1:");
const name2: string | null = prompt("Enter name 2:");
const name3: string | null = prompt("Enter name 3:");
// Create invitation messages
const message1: string = `Dear ${name1}, I would like to invite you to dinner and hear more about your achievements and insights.`;
const message2: string = `Dear ${name2}, your leadership and activism have inspired many. It would be an honor to have you over for dinner.`;
const message3: string = `Dear ${name3}, your literary works have stood the test of time, and I would love to have the opportunity to talk to you about your creative process.`;
// Display messages on console
console.log(message1);
console.log(message2);
console.log(message3);
}