-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogram_13.ts
28 lines (22 loc) · 865 Bytes
/
program_13.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
* Your Own Array: Think of your favorite mode of transportation,
* such as a motorcycle or a car, and make a list that stores several examples.
* Use your list to print a series of statements about these items,
* such as “I would like to own a Honda motorcycle.”
*/
const favoriteTransportation: string[] = ["motorcycle", "car", "bike"];
favoriteTransportation.forEach(mode =>{
switch (mode) {
case "motorcycle":
console.log("I love riding motorcycles, especially on scenic routes.");
break;
case "car":
console.log("My dream car is a sleek sports car with a powerful engine.");
break;
case "bike":
console.log("Bike are perfect for zipping around the city quickly and efficiently.");
break;
default:
break;
}
});