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

Skip to content

Commit 3fab091

Browse files
committed
Merge branch 'master' of github.com:mkruijt/JavaScript
merge changes
2 parents 49a3bae + 1f6d0e1 commit 3fab091

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

Week3/MAKEME.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,34 @@ _Deadline Thursday_
7777
*IMPORTANT NOTE*
7878
In each assignment write at least two `console.log` statements to verify if your code works correctly. In other words proof that you code works as expected. If you need inspiration look at the steps defined in the assignments from last week.
7979

80+
1\. **Strings!**
81+
1\.1 Let's consider the following string: `let myString = "hello,this,is,a,difficult,to,read,sentence"`
82+
1\.2 Add the string to your file and console.log it.
83+
1\.4 Console.log the length of `myString`.
84+
1\.5 The comma's make that the sentence is quite hard to read. Find a way to remove the comma's from the sting and replace them with a spaces
85+
1\.6 Console.log `myString` to see if you succeeded.
86+
87+
2\. **Arrays!**
88+
consider the following array:
89+
90+
```js
91+
let favoriteAnimals = ['blowfish', 'capricorn', 'giraffe'];
92+
```
93+
94+
2\.1 Add a statement that adds Mauro's favorite animal (turtle) to the existing array
95+
2\.2 Log your new array!
96+
2\.3 Now add Jim's favorite animal to the array, its a 'meerkat', but make sure it will be placed after 'blowfish' and before 'capricorn'.
97+
2\.4 Write a console.log statement that explains in words _you think_ the new value of the array is.
98+
2\.5 Log your new new array!
99+
2\.6 Log the length of the array, add a message: "The array has a length of: "(here you should show the length of the array)
100+
2\.7 Jason does not like giraffes, delete this animal from the array
101+
2\.8 Again log your new array.
102+
2\.9 Now if unlike Jim, you don't like meerkats and you want to delete it from the array, but you don't know the position or the `index` of the item in the array, how can you find it?
103+
2\.10 Log the index of meerkat to the console. Add a message so it says: "The item you are looking for is at index: " (here you should show the index of the item)
104+
105+
## Step 5: Custom DOM manipulation challenge :mortar_board:
106+
107+
80108
1. Create a function that takes 3 arguments and returns the sum of the three arguments.
81109

82110
2. Create a function named `colorCar` that receives a color, and prints out, "a red car" for example.
@@ -196,12 +224,4 @@ How to hand in your homework:
196224
• Place the link to your repository folder in Trello.
197225
```
198226
199-
:star: Additional resources and review: [here](/Week2/REVIEW.md):star:
200-
201-
202-
203-
204-
205-
206-
207-
227+
:star: Additional resources and review: [here](/Week2/REVIEW.md):star:

0 commit comments

Comments
 (0)