-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
43 lines (32 loc) · 1.1 KB
/
index.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// QUESTION 1 ------------------------------------------------------------------
export const arrayMean = (array: number[]): number | undefined => {
// TODO: Implement!
return 0;
};
// QUESTION 2 ------------------------------------------------------------------
export type Apartment = {
id: string;
rent: number;
};
export const affordableHousing = (
listings: Apartment[],
budget: number
): string[] => {
// TODO: Implement!
return ["Hello", "World"];
};
// QUESTION 3 ------------------------------------------------------------------
export const evenEven = (array?: string[]): boolean => {
// TODO: Implement!
return false;
};
// QUESTION 4 ------------------------------------------------------------------
// TODO: You should replace this "any" with an accurate type in your submission!
export type Doggo = any;
export const makeSentences = (array: Doggo[]): string[] => {
// TODO: Implement!
return ["Hello", "World"];
};
// DEMO ------------------------------------------------------------------------
// TODO: You can remove this!
console.log("Hello World!");