You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Week2/MAKEME.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ In this section you will be doing interactice exercises, that will allow you to
27
27
Consider the following string:
28
28
29
29
```js
30
-
let myString ='hello,this,is,a,difficult,to,read,sentence';
30
+
let myString ="hello,this,is,a,difficult,to,read,sentence";
31
31
```
32
32
33
33
1. Add the variable to your file.
@@ -82,7 +82,7 @@ You're at a party and you feel thirsty! However, you've got 5 friends who are al
82
82
There are 3 different types of drinks:
83
83
84
84
```js
85
-
constdrinkTypes= ['cola', 'lemonade', 'water'];
85
+
constdrinkTypes= ["cola", "lemonade", "water"];
86
86
```
87
87
88
88
2. Create a loop that runs 5 times. On each iteration, push a drink into the `drinkTray` variable. The `drinkTray` can only hold at most two instances of the same drink type, for example it can only hold 2 colas, 2 lemonades, 2 waters.
@@ -119,13 +119,19 @@ In order to speed up development you'll be using a CSS framework: [Bootstrap 4](
119
119
120
120
> Every week ends with a project you have to build on your own. Instead of getting clear-cut instructions, you'll get a list of criteria that your project needs to measure up to.
121
121
122
-
In this project you'll write a script that calculates grades, based on the American grading system! Let's say a student did a test and they got a 60 out of 100, this script will:
122
+
In this project you'll write a `function` that calculates grades, based on the American grading system! Let's say a student did a test and they got a 60 out of 100, this `function` will:
123
123
124
124
1. convert the score into a percentage
125
125
2. calculate what grade corresponds with that percentage, and
126
126
3. shows in the command line the result: the grade and the percentage
127
127
128
-
When writing the script, make use of the following grade scores:
128
+
In this example this is what we would expect the `function` to return in the command line:
129
+
130
+
```markdown
131
+
You got a B (85%)!
132
+
```
133
+
134
+
When writing the `function`, make use of the following grade scores:
129
135
130
136
```markdown
131
137
Grade A (90% - 100%)
@@ -144,12 +150,6 @@ These are the requirements your project needs to fulfill:
144
150
- Make the return value of the function a template string, so you can insert variables!
145
151
- Use `node` from the command line to test if your code works as expected
146
152
147
-
This is what the script is expected to return in the command line:
0 commit comments