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

Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit baae355

Browse files
authored
Update MAKEME.md
1 parent 2f487ae commit baae355

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Week2/MAKEME.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ On freeCodeCamp.com please do the [Basic JavaScript](https://www.freecodecamp.co
3232
## Step 4: JavaScript
3333

3434
> For all the following exercises create a new .js file. Try to find a proper name for each file or make a small comment about what it does inside for future reference.
35-
35+
---
3636
1\. Write a `console.log` statement saying "Hello World!" for each language that you know.
3737

3838
For example:
@@ -41,15 +41,15 @@ Halo, dunia! // Indonesian
4141
Ciao, mondo! // Italian
4242
Hola, mundo! // Spanish
4343
```
44-
44+
---
4545
2\. Consider the following code:
4646

4747
```
4848
console.log('I'm awesome');
4949
```
5050

5151
Copy the code in your `.js` file and run it. You will see that you will get a SyntaxError. Find a solution for this error. Hint: read the error message carefully, it also gives an indication of where the problem is.
52-
52+
---
5353
3\. Declare a variable `x` and initialize it with an integer, using these exact steps:
5454
3\.1 First, _declare_ your variable `x` (do not initialize it yet).
5555
3\.2 Add a console.log statement that explains that explains in words what _you think_ the value of `x` is, like in this example:
@@ -71,7 +71,7 @@ Copy the code in your `.js` file and run it. You will see that you will get a Sy
7171
console.log('the value of x will be: whateverYouThinkItWillLog');
7272
// TODO -> log value of x again
7373
```
74-
74+
---
7575
4\. Declare a variable `y` and assign a string to it.
7676
4\.1 Write a console.log statement in which you explain in words what _you think_ the value of the string is.
7777
4\.2 Now console.log the variable `y`.
@@ -86,15 +86,15 @@ Copy the code in your `.js` file and run it. You will see that you will get a Sy
8686
console.log('the value of my string will be: whateverYouThinkItWillLog');
8787
// TODO -> log the actual value of the string to the console
8888
```
89-
89+
---
9090
5\. How do you round the number 7.25, to the nearest integer (i.e., whole number)?
9191
5\.1 Declare a variable `z` and assign the number 7.25 to it.
9292
5\.2 Console.log `z`.
9393
5\.3 Declare another variable `a` that has the value of z but rounded to the nearest integer.
9494
5\.4 Console.log `a`.
9595
5\.5 So now we have `z` and `a` find a way to compare the two values and store the highest of the two in a new variable.
9696
5\.6 Console.log the highest value.
97-
97+
---
9898
6\. *Arrays!*
9999
6\.1 Declare an empty array. Make sure that the name you choose indicates 'plurality', because an array is capable of containing more than one element. (See [Naming conventions](../fundamentals/naming_conventions.md).)
100100
6\.2 Write a console.log statement that explains in words what you think the value of the array is.
@@ -103,13 +103,13 @@ Copy the code in your `.js` file and run it. You will see that you will get a Sy
103103
6\.5 Log your array.
104104
6\.6 Add a statement that adds Daan's favorite animal ('baby pig') to the *existing array*.
105105
6\.7 Log your new array!
106-
106+
---
107107
7\. *More strings*
108108
7\.1 Let's consider the following string: `let myString = "this is a test"`.
109109
7\.2 Add the string to your file and console.log it.
110110
7\.3 Find a way to get the length of `myString`.
111111
7\.4 Console.log the length of `myString`.
112-
112+
---
113113
8\. Write a program that checks the types of two variables and prints out `SAME TYPE` if they are the same type.
114114
8\.1 First declare at least four variables and assign them different data types.
115115
8\.2 For each variable write a `console.log` statement that logs the value
@@ -136,7 +136,7 @@ if (...) {
136136
}
137137
// TODO -> add a way of giving feedback if your variables don't have the same type
138138
```
139-
139+
---
140140
9\. If `x` equals 7, and the only other statement is `x = x % 3`, what would be the new value of `x`?
141141
9\.1 Add at least 3 `console.log` statements in which you show that you understand what `%` does.
142142

0 commit comments

Comments
 (0)