-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathq41.ts
More file actions
24 lines (18 loc) · 728 Bytes
/
q41.ts
File metadata and controls
24 lines (18 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Magicians: Make a array of magician’s names. Pass the array to a function called show_magicians(), which prints the name of each magician in the array.
// let magicians = ["Harry Houdini", "David Copperfield", "Penn Jillette", "Teller"];
// function show_magicians(magicians) {
// for (let i = 0; i < magicians.length; i++) {
// console.log(magicians[i]);
// }
// }
// show_magicians(magicians);
export default function q41(){
let magicians: string[] = ["Harry Houdini", "David Copperfield", "Penn Jillette", "Teller"];
function showMagicians(magicians: string[]) {
magicians.forEach(function(magician: string) {
console.log(magician);
});
}
showMagicians(magicians);
}
q41();