-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
54 lines (46 loc) · 2.07 KB
/
index.html
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
<!DOCTYPE html>
<html>
<body>
<h1>Building Objects With Functionality</h1>
<script>
/*
PROBLEM 1: Write an object called chef that includes your name, where you are from, and a greet method that returns "Hello I am (add your name), and my specialty is grilling". Console.log the result of the greet method so it prints to the console.
*/
//ENTER YOUR CODE HERE
/*
PROBLEM 2: Write an object called baker that includes her name, her station (the bakery), and a bake method that takes a name and baked good as parameters
and returns "(add name) just baked a (add baked good)". Console.log the result of the bake method so it prints to the console.
*/
//ENTER YOUR CODE HERE
/*
PROBLEM 3: Write an object called knife that uses the compact syntax and includes:
• A boolean showing if the knife is sharp or not
• The size of the knife
• A cut method with a number and a food item as parameters that returns "cut (add food) in (add number) seconds"
Console.log the result of the cut method so it prints to the console.
*/
//ENTER YOUR CODE HERE
/*
PROBLEM 4: Write an object called Chicken Parmesan that uses the compact syntax and includes:
• A course property with a value of entree
• A type property with a value of Italian
• A serve method with a course and a food item as parameters that returns "(food item) has been served for the (course) course"
Console.log the result of the serve method so it prints to the console.
*/
//ENTER YOUR CODE HERE
/*
PROBLEM 5 (DEBUGGING): When trying to have a hostess seat a table, you are getting this error: "Unexpected token 'function'". Fix this error and console.log the seat method so that the method prints to the console. Note: You can solve this with either method syntax.
*/
/*
let hostess = {
name: "Cara",
experience: "7 years",
function seat(number){
return `Right this way to table ${number}`;
}
}
console.log(hostess.seat(5));
*/
</script>
</body>
</html>