From e17570eced613bc361304dc9a7baa26f7a0d4e6d Mon Sep 17 00:00:00 2001 From: Lilitalop <89038353+Lilitalop@users.noreply.github.com> Date: Tue, 17 Feb 2026 18:28:12 -0500 Subject: [PATCH 1/2] Add files via upload --- lab-js-basic-algorithms/README.md | 209 ++++++++++++++++++++++++++++ lab-js-basic-algorithms/js/index.js | 6 + 2 files changed, 215 insertions(+) create mode 100644 lab-js-basic-algorithms/README.md create mode 100644 lab-js-basic-algorithms/js/index.js diff --git a/lab-js-basic-algorithms/README.md b/lab-js-basic-algorithms/README.md new file mode 100644 index 0000000..fb0e420 --- /dev/null +++ b/lab-js-basic-algorithms/README.md @@ -0,0 +1,209 @@ + + + + + +# LAB | JS Basic Algorithms + + + +Welcome to your first bootcamp exercise at Open Bootcamp! + + + +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. + + + +Ready? + + + +![qrjeCm](https://user-images.githubusercontent.com/76580/167263489-bd345c02-6c3b-425e-9a9c-96390dea9ba6.gif) + + + +## Introduction + + + + +Ready to start? + + + + +## Requirements + + + +- Fork this repo + +- Clone this repo + +- Type this in the *File Tab* (left panel) + + + +```javascript + +console.log("I'm ready!"); + +``` + +- Save + +- Open a terminal and navigate to the directory where the script file is, then issue the following command `node js/index.js` + +- If you can see the message in the terminal panel (bottom), you are really ready! + + + +- __After the first iteration, or later at any point, or once you finish, follow the steps for submission.__ + + + +## Submission + + + +Upon completion, run the following commands: + + + +```shell + +$ git add . + +$ git commit -m "done" + +$ git push origin master + +``` + +Create Pull Request so that we can check your work. Not all assignments are meant to be reviewed but expect us to randomly review few and give you feedback. + + + +_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 we will be able to check it._ + + + + + + + + + + + +## Instructions + + + +### Iteration 1: Names and Input + + + +1.1 Create a variable `hacker1` with the driver's name.
+ +1.2 Print `"The driver's name is XXXX"`.
+ +1.3 Create a variable `hacker2` with the navigator's name.
+ +1.4 Print `"The navigator's name is YYYY"`. + + + +### Iteration 2: Conditionals + +2.1. Depending on which name [is longer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), print: + +
+ +- `The driver has the longest name, it has XX characters.` or
+ +- `It seems that the navigator has the longest name, it has XX characters.` or
+ +- `Wow, you both have equally long names, XX characters!`. + + + +### Iteration 3: Loops + +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) + +i.e. `"J O H N"` + +3.2 Print all the characters of the navigator's name, in reverse order. + +i.e. `"nhoJ"` + +3.3 Depending on the [lexicographic order](https://en.wikipedia.org/wiki/Lexicographical_order) of the strings, print:
+ +- `The driver's name goes first.`
+ +- `Yo, the navigator goes first definitely.`
+ +- `What?! You both have the same name?` + + + +### Bonus Time! + + + +#### Bonus 1: + +Go to [lorem ipsum generator](http://www.lipsum.com/) and: + +- Generate 3 paragraphs. Store the text in a variable type of string. + +- Make your program count the number of words in the string. + +- Make your program count the number of times the Latin word [`et`](https://en.wiktionary.org/wiki/et#Latin) appears. + + + +#### Bonus 2: + +Create a new variable `phraseToCheck` and have it contain some string value. Write a code that will check if the value we assigned to this variable is a [Palindrome](https://en.wikipedia.org/wiki/Palindrome). Here are some examples of palindromes: + +- "A man, a plan, a canal, Panama!" + +- "Amor, Roma" + +- "race car" + +- "stack cats" + +- "step on no pets" + +- "taco cat" + +- "put it up" + +- "Was it a car or a cat I saw?" and "No 'x' in Nixon". + +__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: + + + +## Extra Resources + + + +- [String - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) + +- [if - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else) + +- [while - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while) + +- [for - MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) + + + + +__Happy coding!__ :heart: diff --git a/lab-js-basic-algorithms/js/index.js b/lab-js-basic-algorithms/js/index.js new file mode 100644 index 0000000..6a808df --- /dev/null +++ b/lab-js-basic-algorithms/js/index.js @@ -0,0 +1,6 @@ +// Iteration 1: Names and Input +// +// Iteration 2: Conditionals + + +// Iteration 3: Loops From 98e653b30a0de8312ddb24bf364b7d283ea02ade Mon Sep 17 00:00:00 2001 From: Lilitalop <89038353+Lilitalop@users.noreply.github.com> Date: Sat, 21 Feb 2026 14:02:12 -0500 Subject: [PATCH 2/2] Add files via upload --- asignaci-n-2-openbootcamp/LICENSE.txt | 21 ++++++++++++++++ asignaci-n-2-openbootcamp/README.md | 6 +++++ asignaci-n-2-openbootcamp/dist/index.html | 26 ++++++++++++++++++++ asignaci-n-2-openbootcamp/dist/script.js | 29 +++++++++++++++++++++++ asignaci-n-2-openbootcamp/src/index.html | 10 ++++++++ asignaci-n-2-openbootcamp/src/script.js | 29 +++++++++++++++++++++++ 6 files changed, 121 insertions(+) create mode 100644 asignaci-n-2-openbootcamp/LICENSE.txt create mode 100644 asignaci-n-2-openbootcamp/README.md create mode 100644 asignaci-n-2-openbootcamp/dist/index.html create mode 100644 asignaci-n-2-openbootcamp/dist/script.js create mode 100644 asignaci-n-2-openbootcamp/src/index.html create mode 100644 asignaci-n-2-openbootcamp/src/script.js diff --git a/asignaci-n-2-openbootcamp/LICENSE.txt b/asignaci-n-2-openbootcamp/LICENSE.txt new file mode 100644 index 0000000..f53e024 --- /dev/null +++ b/asignaci-n-2-openbootcamp/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2026 Liliana Yelitza López de Chaparro (https://codepen.io/Liliana-Yelitza-L-pez-de-Chaparro/pen/gbMJqJo) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/asignaci-n-2-openbootcamp/README.md b/asignaci-n-2-openbootcamp/README.md new file mode 100644 index 0000000..afd0f42 --- /dev/null +++ b/asignaci-n-2-openbootcamp/README.md @@ -0,0 +1,6 @@ +# Asignación 2 OpenBootCamp + +A Pen created on CodePen. + +Original URL: [https://codepen.io/Liliana-Yelitza-L-pez-de-Chaparro/pen/gbMJqJo](https://codepen.io/Liliana-Yelitza-L-pez-de-Chaparro/pen/gbMJqJo). + diff --git a/asignaci-n-2-openbootcamp/dist/index.html b/asignaci-n-2-openbootcamp/dist/index.html new file mode 100644 index 0000000..76e0b3c --- /dev/null +++ b/asignaci-n-2-openbootcamp/dist/index.html @@ -0,0 +1,26 @@ + + + + + + Asignación 2 OpenBootCamp + + + + + + JavaScript for Open BootCamp + + + + Example + + +

my second assignment for Open BootCamp

+ + + + + + + diff --git a/asignaci-n-2-openbootcamp/dist/script.js b/asignaci-n-2-openbootcamp/dist/script.js new file mode 100644 index 0000000..901405c --- /dev/null +++ b/asignaci-n-2-openbootcamp/dist/script.js @@ -0,0 +1,29 @@ +//******************** + + // Initial code + let product = {name: 'cargador', + price: 280, + doesItWork: false, + previousOwner: "Bob" + }; + + for (let i = 0; i < product.length; i++) + { + console.log(`${key}: ${product[key]}`) + } + + delete product.previousOwner + product.doesItWork = true + + if (product.price > 100) { + product.discountPercentage = 10 + + console.log(`Tenemos el ${product.name} en venta por $${product.price}, con el ${product.discountPercentage}% de descuento!`); + + console.log("Precio sin porcentaje= " + product.price ) + + totalPorcentaje = product.price * product.discountPercentage / 100 + console.log("El monto del 10% es: " + totalPorcentaje) + product.price = product.price - totalPorcentaje; + console.log("El precio con el 10% de descuento es: "+ product.price); + } \ No newline at end of file diff --git a/asignaci-n-2-openbootcamp/src/index.html b/asignaci-n-2-openbootcamp/src/index.html new file mode 100644 index 0000000..2a33f63 --- /dev/null +++ b/asignaci-n-2-openbootcamp/src/index.html @@ -0,0 +1,10 @@ +JavaScript for Open BootCamp + + + + Example + + +

my second assignment for Open BootCamp

+ + \ No newline at end of file diff --git a/asignaci-n-2-openbootcamp/src/script.js b/asignaci-n-2-openbootcamp/src/script.js new file mode 100644 index 0000000..c8cfbef --- /dev/null +++ b/asignaci-n-2-openbootcamp/src/script.js @@ -0,0 +1,29 @@ +//******************** + + // Initial code + let product = {name: 'cargador', + price: 280, + doesItWork: false, + previousOwner: "Bob" + }; + + for (let i = 0; i < product.length; i++) + { + console.log(`${key}: ${product[key]}`) + } + + delete product.previousOwner + product.doesItWork = true + + if (product.price > 100) { + product.discountPercentage = 10 + + console.log(`Tenemos el ${product.name} en venta por $${product.price}, con el ${product.discountPercentage}% de descuento!`); + + console.log("Precio sin porcentaje= " + product.price ) + + totalPorcentaje = product.price * product.discountPercentage / 100 + console.log("El monto del 10% es: " + totalPorcentaje) + product.price = product.price - totalPorcentaje; + console.log("El precio con el 10% de descuento es: "+ product.price); + } \ No newline at end of file