From b7103063e3dbe0a83188598ec26e1f5f18aaa8fb Mon Sep 17 00:00:00 2001 From: Uros Cirkovic Date: Mon, 22 Jan 2024 10:39:10 +0000 Subject: [PATCH 1/3] feat(learning goals): run javascript from IDE --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 90918098c..52de53f9e 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ This exercise aims to familiarize you with the primitive data structures in Java Upon completion of this exercise, you will be able to: + - Run JavaScript code from your IDE, using a local server to load it in the browser - Declare variables using `const` and `let` keywords and use them to store values. - Assign values to variables using assignment operators (`=` , `+=` , `-=` , etc.). - Use conditional statements (`if`, `else if`, `else`) and logical operators (AND, OR, NOT) to control the flow of the program. From f12bffa1bafb351fae2a63a451412ebe93de3205 Mon Sep 17 00:00:00 2001 From: Uros Cirkovic Date: Mon, 22 Jan 2024 10:39:31 +0000 Subject: [PATCH 2/3] feat: link index.js to index.html --- index.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 index.html diff --git a/index.html b/index.html new file mode 100644 index 000000000..0758034e6 --- /dev/null +++ b/index.html @@ -0,0 +1,16 @@ + + + + + + LAB | JS Basic Algorithms + + +

LAB | JS Basic Algorithms

+
+
+

Open the Dev Tools console to see the console output.

+ + + + \ No newline at end of file From 53fcb93efc8bda855ce0f3fe5a73a7a154be59d3 Mon Sep 17 00:00:00 2001 From: Uros Cirkovic Date: Mon, 22 Jan 2024 11:40:33 +0000 Subject: [PATCH 3/3] feat: run javascript from vs code --- README.md | 64 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 52de53f9e..c9f640451 100644 --- a/README.md +++ b/README.md @@ -37,26 +37,42 @@ This exercise aims to familiarize you with the primitive data structures in Java ## Introduction -For this **pair-programming** activity, we will use a [REPL](https://en.wikipedia.org/wiki/Read–eval–print_loop). To make things as simple as possible, we are going to use an in-browser JavaScript REPL that is provided by the browser-based IDE, [repl.it](https://replit.com/languages/javascript). +In this **pair-programming** lab, you will have a chance to practice and reinforce your understanding of the basic JavaScript concepts you have learned so far. + +You will be working with a partner on this lab, practicing pair-programming. During the exercise, you should work together on one computer or code editor and take turns writting the code with your partner. One person will act as the **driver** and the other will be the **navigator**. The driver is the one writing the code and the navigator is the one reviewing the code and guiding the driver. + +You should switch roles every 15 minutes or after completing each iteration, to give both of you a chance to write code and practice discussing problems and solutions. Ready to start? -## Requirements +
+ +## Getting Started +For this exercise, we will use VSCode and the Live Server extension to run the JavaScript code. To do it, follow these steps: + + - Fork this repo -- Clone this repo -- Go to [repl.it](https://repl.it/languages/nodejs) and create an account (or log in if you have one) -- Create a new reply by clicking on + Create Repl -- Type this in the *Code Editor* (left panel) - ```javascript - console.log("I'm ready!"); - ``` -- Press `run ►` -- If you can see the message in the right side panel, you are really ready! - ![lab-js-basic-algorithms-replit-ready](https://education-team-2020.s3.eu-west-1.amazonaws.com/web-dev/lab-js-basic-algorithms-replit-ready.png) + + +- Clone it to your machine + + + +- Open the project folder in VS Code + + + +- Once in VS Code, open the file using the [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) extension. To do this, right-click on the `index.html` file and select **Open with Live Server**. + + + +- A new browser window will open with the `index.html` file loaded. You can now start working on the exercise. + +
+ -- **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.** ## Submission @@ -64,21 +80,33 @@ Ready to start? ```bash git add . -git commit -m "done" +git commit -m "Solved lab" git push origin master ``` - Create a Pull Request and submit your assignment. -*You should make a PR (Pull Request) when 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 allowing the teaching staff to check your progress.* +
+ +*At Ironhack, we use Pull Requests (PR) to submit lab assignments and verify student's work. After completing all the mandatory iterations, you should commit your code and create a Pull Request. If you can't finish a part of an iteration or still haven't completed all the iterations or the bonuses, it's okay; you should still submit the Pull Request before the start of the class on the next day.*
+*Once you make a PR, any other time you push the changes (following the previous three steps), your change will appear automatically on the PR, allowing the teaching staff to verify your submission.* + +
- - ## Instructions +You should do all your work in the `index.js` file. The file is already linked to the `index.html` file, so you can open the `index.html` file in the browser and see the results of your work in the console. + +
+ +Before you start writing any code, make sure to carefully read the instructions provided for each iteration and understand what you are asked to do. + +We hope you enjoy it! :blue_heart: + +
+ ### Iteration 1: Names and Input 1.1 Create a variable `hacker1` with the driver's name.