Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 888e706

Browse files
authored
Update homework.md
1 parent eeb874c commit 888e706

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

javascript1/week2/homework.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ BUT people are asking: What will be the next product that truly defines Smart-ea
6262
### Flight booking fullname function
6363

6464
Even for a startup as successful as Smart-ease there needs to be money in the bank. A customer from a flight booking website has asked for our help creating a specific part of their application:
65+
6566
When a user books a flight they **write their firstname and surname**, but when the ticket is printed a **fullname should be displayed**. It is our responsibility to create that.
6667

6768
Create a function called `getFullname` that returns a fullname.
@@ -71,9 +72,9 @@ It should have two parameters: `firstname` and `surname`.
7172
getFullname("Benjamin", "Hughes"); // returns "Benjamin Hughes"
7273
```
7374

74-
Now try to create two variables `fullname1` and `fullname2` these two variables should be assigned to the return of calling the `getFullname` function.
75+
Now try to create two variables `fullname1` and `fullname2` these two variables should be assigned to calling the `getFullname` function.
7576

76-
Log out the two fullnames.
77+
Log out the two fullname variables.
7778

7879
#### Formal fullname
7980

@@ -92,6 +93,8 @@ Remember to consider someone calling the function with an empty string as firstn
9293

9394
Try out your code by pasting your `getFullname` function in the javascript part of this codepen: https://codepen.io/hackyourfuture-cph/pen/jJWwbN
9495

96+
But what if the person is a woman? Describe how you would fix the `getFullname` so it also works for women
97+
9598
### Event application
9699

97100
Another customer has contacted us. He works for a secret company that rimes with foogle. The customer works on their calendar application. They need some functionality to help with writing what weekday an event is held.
@@ -110,7 +113,7 @@ console.log(getEventWeekday(2)); // Logs out "Sunday"
110113

111114
You should get the today's day from the system.
112115

113-
Hint: use remainder operator, array indexes and investigate new Date in js.
116+
Hint: use remainder operator, array indexes and investigate `new Date` in js.
114117

115118
### Weather wear
116119

0 commit comments

Comments
 (0)