-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
59 lines (46 loc) · 1.62 KB
/
app.js
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const colors = ['red', 'blue', 'green', 'yellow']
console.log("============ Question 1 ============")
// Using its index value in colors, console.log 'blue'
console.log("============ Question 2 ============")
// add the value 'purple' to the end of the colors array
// console.log the result
const benny = {
name: 'Benny',
age: 6,
breeds: ['Terrier', 'Chihauhau', 'Pekingese']
}
console.log("============ Question 3 ============")
// Using dot notation, console.log the name and age of Benny
console.log("============ Question 4 ============")
// Using dot notation, console.log any one of Benny's breeds
console.log("============ Question 5 ============")
// Add code to the whisper function so that it takes whatever string is given to it
// and returns an all lower case version
function whisper(word){
// Your code here
}
console.log(`this should print true: ${whisper('Hello') === 'hello'}`)
console.log(`this should print true: ${whisper('BOOGERS') === 'boogers'}`)
console.log("============ BONUS ============")
const dogs = [{
name: 'Benny',
age: 6,
breeds: ['Terrier', 'Chihauhau', 'Pekingese']
},
{
name: 'Finley',
age: 2,
breeds: ['Golden Retriever', 'Standard Poodle']
},
{
name: 'Ruby',
age: 4,
breeds: ['Unknown Mix']
}]
console.log("============ BONUS -- 1 ============")
// Using index values and dot notation, console.log each dog's name
console.log("============ BONUS -- 2 ============")
// Using index values and dot notation, console.log the first breed of each dog
console.log("============ BONUS -- 3 ============")
// Using template literals, print the following string
// Benny is 6 years old