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: README.md
+36-20Lines changed: 36 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -2,55 +2,71 @@
2
2
3
3
# LAB | JS Basic Algorithms
4
4
5
-
Welcome to your first bootcamp exercise at Ironhack!
5
+
Welcome to your first JavaScript lab at Ironhack!
6
6
7
-
The goal of this exercise is to get you familiarized with the primitive data structures in JavaScript, which we just covered in the class. Feel free to reference lesson materials and don't limit yourself but be curious and use Google to explore multiple solutions.
8
-
9
-
Ready?
7
+
The goal of this exercise is to get you familiarized with the primitive data structures in JavaScript, which we have covered in the class. Feel free to reference lesson materials and don't limit yourself but be curious and use Google to explore multiple solutions.
For this **pair-programming** activity we are going to have both people in the pair work in their own repos.
16
-
At the end of the exercise, both students should have identical code in their respective repos.
15
+
For this **pair-programming** activity we are going to use a [REPL](https://en.wikipedia.org/wiki/Read–eval–print_loop). You can find a REPL that runs in the browser for programming languages as JavaScript in https://repl.it/languages/babel.
17
16
18
17
Ready to start?
19
18
20
-
21
19
## Requirements
22
20
23
21
- Fork this repo
22
+
24
23
- Clone this repo
25
-
- Type this in the *File Tab* (left panel)
24
+
25
+
- Go to [repl.it](https://repl.it/languages/nodejs) and create an account (or login if you have one)
26
+
27
+
- Create a new reply by clicking on <kbd>+ Create Repl</kbd>
28
+
29
+
- Type this in the *Code Editor* (left panel)
26
30
27
31
```javascript
28
32
console.log("I'm ready!");
29
33
```
30
-
- Save
31
-
- Open a terminal and navigate to the directory where the script file is, then issue the following command `node js/index.js`
32
-
- If you can see the message in the terminal panel (bottom), you are really ready!
33
34
34
-
-__After the first iteration, or later at any point, or once you finish, follow the steps for submission.__
35
+
36
+
37
+
- Press `run ►`
38
+
39
+
- If you can see the message in the right side panel, you are really ready!
-**When you are done completely or at any point after the first iteration, copy your code into the `index.js` file and follow the steps for submission.**
46
+
47
+
35
48
36
49
## Submission
37
50
38
51
Upon completion, run the following commands:
39
52
40
-
```shell
53
+
```bash
41
54
$ git add .
42
55
$ git commit -m "done"
43
56
$ git push origin master
44
57
```
45
-
Create Pull Request so your TAs can check up your work.
46
58
47
-
_You should make a PR (stands for Pull Request) as soon as you make any significant change. You shouldn't have to wait until you're completely done with this or any other exercise to make the PR. After you do the first PR, any other time you push the changes (following the previous three steps), your change will appear automatically on the PR and your TAs will be able to check it._
59
+
Create a Pull Request so that the TAs can check your work.
60
+
61
+
*You should make a PR (stands for Pull Request) as soon as you make any significant change. You shouldn't have to wait until you're completely done with this or any other exercise to make the PR. After you do the first PR, any other time you push the changes (following the previous three steps), your change will appear automatically on the PR and your TAs will be able to check it.*
48
62
49
63
<!-- ## Submission -->
50
64
51
65
<!-- When you are done and you have checked that everything works fine, click on the **Share** button and copy the link from the *Share Link* field. Send this link to your TAs so they can check up your work.
@@ -70,10 +86,10 @@ _You should make a PR (stands for Pull Request) as soon as you make any signific
70
86
### Iteration 3: Loops
71
87
3.1 Print all the characters of the driver's name, separated by a space and [in capitals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)
72
88
i.e. `"J O H N"`
73
-
89
+
74
90
3.2 Print all the characters of the navigator's name, in reverse order.
75
91
i.e. `"nhoJ"`
76
-
92
+
77
93
3.3 Depending on the [lexicographic order](https://en.wikipedia.org/wiki/Lexicographical_order) of the strings, print: <br>
78
94
- `The driver's name goes first.` <br>
79
95
- `Yo, the navigator goes first definitely.` <br>
@@ -97,8 +113,8 @@ Create a new variable `phraseToCheck` and have it contain some string value. Wri
97
113
- "taco cat"
98
114
- "put it up"
99
115
- "Was it a car or a cat I saw?" and "No 'x' in Nixon".
100
-
101
-
__Hint__: If you use Google to help you to find solution to this iteration, you might run into some solutions that use advanced string or array methods (such as _join()_, _reverse()_, etc.). However, try to apply the knowledge you currently have since you can build pretty nice solution with just using `for` loop, `if-else` statements with some `break` and `continue`... Just sayin' :smiley:
116
+
117
+
__Hint__: If you use Google to help you to find solution to this iteration, you might run into some advanced solutions that use string or array methods (such as _join()_, _reverse()_, etc.). However, try to apply the knowledge you currently have since you can build pretty nice solution with just using `for` loop, `if-else` statements with some `break` and `continue`... Just sayin' :smiley:
102
118
103
119
## Extra Resources
104
120
@@ -107,5 +123,5 @@ Create a new variable `phraseToCheck` and have it contain some string value. Wri
0 commit comments