Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript Basics Course: Replace Replit exercises #29161

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
25 changes: 16 additions & 9 deletions foundations/javascript_basics/arrays_and_loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,27 @@ Test Driven Development \(TDD\) is a phrase you often hear in the dev world. It

In many ways, TDD is much more productive than writing code without tests. If we didn't have the test for the adding function above, we would have to run the code ourselves over and over, plugging in different numbers until we were sure that it was working... not a big deal for a basic `add(2, 2)`, but imagine having to do that for more complicated functions, like checking whether or not someone has won a game of tic tac toe: \(`game_win(["o", null,"x",null,"x",null,"x", "o", "o"])`). If you didn't do TDD, then you might actually have to play multiple games against yourself just to test if the function was working correctly!

We will teach you the art of actually writing these tests later in the course. The following practice has the tests already written out for you. All you have to do is set up the testing environment, read the specs, and write the code that makes them pass!
We will teach you the art of actually writing these tests later in the course. For now, you will continue to work on the JavaScript exercises from before.

### Assignment

<div class="lesson-content__panel" markdown="1">

1. Go and review the [README of our `javascript-exercises` repository](https://github.com/TheOdinProject/javascript-exercises#readme) to set up your local environment. Once you have cloned the repository and installed Jest, review each README file prior to completing the following exercises in order:
- `01_helloWorld` (This exercise is intentionally very beginner friendly to ensure that you have set up everything properly!)
- `02_repeatString`
- `03_reverseString`
- `04_removeFromArray`
- `05_sumAll`
- `06_leapYears`
- `07_tempConversion`
1. If you already completed our [Installing Node.js lesson](https://www.theodinproject.com/lessons/foundations-installing-node-js), you may move on to the next step!

Otherwise, do the following in order:

- Complete the [Installing Node.js lesson](https://www.theodinproject.com/lessons/foundations-installing-node-js)
- Follow the [instructions in the README of our `javascript-exercises` repository](https://github.com/TheOdinProject/javascript-exercises#how-to-use-these-exercises) to set up your local environment. You should have forked the repository, cloned it and installed Jest.
- From the [JavaScript exercises repository](https://github.com/TheOdinProject/javascript-exercises), review the README file prior to completing the exercise `01_helloWorld`

1. Go back to the [JavaScript exercises repository](https://github.com/TheOdinProject/javascript-exercises) that we introduced in the [Data Types and Conditionals](https://www.theodinproject.com/lessons/foundations-data-types-and-conditionals) assignment. Review each README file prior to completing the following exercises in order:
- `06_repeatString`
- `07_reverseString`
- `08_removeFromArray`
- `09_sumAll`
- `10_leapYears`
- `11_tempConversion`

Note: Solutions for these exercises can be found in the `solution` folder of each exercise.

Expand Down
37 changes: 9 additions & 28 deletions foundations/javascript_basics/data_types_and_conditionals.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,37 +39,18 @@ Now it's time for the fun stuff... So far, we haven't done much with our progra

<div class="lesson-content__panel" markdown="1">

To give you a good bit of practice, we have created replit.com exercises for you to play with. We believe it's best to practice programming on your *own* computer rather than in an online environment, but we'll get to that soon enough.
To give you a good bit of practice, we have created JavaScript exercises for you to play with. They contain tests that are used to make sure that your code works like it is supposed to. Anywhere you see `return`, it just means that when the function finishes running, it will spit back whatever comes after `return`. In future lessons, we will go into much further detail regarding these concepts, so just hang in there for now!

Be sure to do the lessons in the order presented here. Pressing "run" at the top will run the code. Read all directions, watch the terminal, and read all the errors. Don't forget to use 'console.log' extensively.
Be sure to follow the order presented here. Read all the directions, watch the terminal, and read all the errors.

To get started, you will need to create a free [Replit](https://replit.com/) account. After you have done that, you can do the exercises down below by opening their link and clicking "Fork" or "Remix" in their Replit page.
Note: Feel free to browse the files on the left column to gain familiarity with it.
1. Follow the [instructions in the README of our `javascript-exercises` repository](https://github.com/TheOdinProject/javascript-exercises#how-to-use-these-exercises) to set up your local environment. Once you have forked the repository, cloned it and installed Jest, review each README file prior to completing the following exercises in order:
- `01_helloWorld` (This exercise is intentionally very beginner-friendly to ensure that you have everything set up properly!)
- `02_addNumbers`
- `03_numberChecker`
- `04_mathEquations`
- `05_joinStrings`

<div class="lesson-note lesson-note--warning" markdown="1">

#### Replit fork limit

Replit now limits free accounts to having 3 repls at a time. If you reach the limit of 3 repls, you can delete one or more of the previous forks to create a room for the new one. To do so, go to [your repls](https://replit.com/repls) and delete what you no longer need.

</div>

<div class="lesson-note lesson-note--warning" markdown="1">

#### Replit and AI

Replit recently introduced an AI assistant, which is on by default. Before trying any of the exercises, you should first disable it, in order to prevent it from spoiling the exercise. You can do so by clicking on the button labeled AI in the bottom left corner of the code view and then unchecking the "Enable" checkbox.

</div>

- [Exercise 1](https://replit.com/@OdinProject/troubleshooting#troubleshooting.js)
- In this exercise, you will be working out of the file called `troubleshooting.js`.
- [Exercise 2](https://replit.com/@OdinProject/enter-a-number#script.js)
- You will be working out of `script.js`, and you will use the console in the 'webview' pane to check your work. To access the console, click the wrench icon, which is located on the right side of the address bar within the 'webview' pane.
- [Exercise 3](https://replit.com/@OdinProject/lets-do-some-math#math.js)
- You will be working out of `math.js`.
- [Exercise 4](https://replit.com/@OdinProject/direction-follow#follow.js)
- You will be working out of `follow.js`.
Note: Solutions for these exercises can be found in the `solution` folder of each exercise.

</div>

Expand Down
12 changes: 6 additions & 6 deletions foundations/javascript_basics/object_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ function sumOfTripledEvens(array) {
1. Read through the [array method guide](https://javascript.info/array-methods) for a comprehensive overview of array methods in JavaScript. Complete the exercises at the end, except for "Create an extendable calculator," as it involves more advanced concepts that we have not yet covered.
1. Follow up by watching [JavaScript Array Cardio Practice - Day 1](https://www.youtube.com/watch?v=HB1ZC7czKRs) by Wes Bos. To follow along, fork and clone the [JavaScript30 repository](https://github.com/wesbos/JavaScript30).
1. Watch and code along with [Array Cardio Day 2](https://www.youtube.com/watch?v=QNmRfyNg1lw).
1. At this point you just need a little more practice! Go back to the [JavaScript exercises repository](https://github.com/TheOdinProject/javascript-exercises) that we introduced in the [Arrays and Loops](https://www.theodinproject.com/lessons/foundations-arrays-and-loops) assignment. Review each README file prior to completing the following exercises in order:
- `08_calculator`
- `09_palindromes`
- `10_fibonacci`
- `11_getTheTitles`
- `12_findTheOldest`
1. At this point you just need a little more practice! Go back to the [JavaScript exercises repository](https://github.com/TheOdinProject/javascript-exercises) that we introduced in the [Data Types and Conditionals](https://www.theodinproject.com/lessons/foundations-data-types-and-conditionals) assignment. Review each README file prior to completing the following exercises in order:
- `12_calculator`
- `13_palindromes`
- `14_fibonacci`
- `15_getTheTitles`
- `16_findTheOldest`

Note: Solutions for these exercises can be found in the `solution` folder of each exercise.

Expand Down
Loading