Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
730856e
Update bc.json
alesanchezr Apr 23, 2020
01d7415
added video an solution
alesanchezr Apr 23, 2020
4993570
added video an solution
alesanchezr Apr 23, 2020
21c16a6
Update README.md
alesanchezr May 18, 2020
2ffdfd2
Update bc.json
alesanchezr May 18, 2020
32e8ead
Coorected typos and grammar errors
gmihov001 Jul 13, 2020
0735046
Merge pull request #1 from gmihov001/master
alesanchezr Jul 15, 2020
b707487
Update README
JimenaEB Jul 22, 2020
25aab26
Merge pull request #2 from JimenaEB/patch-1
alesanchezr Jul 22, 2020
7d828f8
Update README.md
alexbrowng Sep 24, 2020
6e9fd80
Merge pull request #3 from unocongafas/patch-1
alesanchezr Sep 24, 2020
c91de76
consistency
ElviraQDP Oct 1, 2020
62b0364
Merge pull request #4 from ElviraQDP/patch-1
alesanchezr Oct 6, 2020
c7f5caf
Update README.es.md
alesanchezr Dec 17, 2020
efef479
instructions updated
ElviraQDP Mar 22, 2021
6801380
Merge pull request #9 from ElviraQDP/master
alesanchezr Mar 22, 2021
3aa66c4
updating instructions
ElviraQDP Mar 25, 2021
89213f4
Merge pull request #10 from ElviraQDP/patch-2
alesanchezr Mar 25, 2021
b229f84
Update README.md
alesanchezr Mar 25, 2021
744b3b9
Update README.es.md
ElviraQDP Apr 7, 2021
34e7aab
boilerplate changed on README.es
ElviraQDP Apr 7, 2021
7c7329e
Merge pull request #11 from ElviraQDP/patch-3
alesanchezr Apr 7, 2021
833cf40
URL format fixed (line 16)
kant Apr 10, 2022
00b58aa
Minor fix (line 38)
kant Apr 10, 2022
6018c6b
Fixed http markup (line 16)
kant May 31, 2022
defc33a
Update README.es.md
mojonapower Jun 10, 2022
92b6352
Merge pull request #17 from mojonapower/patch-1
alesanchezr Sep 14, 2022
555296e
Merge branch 'master' into patch-3
alesanchezr Sep 14, 2022
4c357bf
Merge pull request #16 from kant/patch-3
alesanchezr Sep 14, 2022
cc2eb3d
Merge pull request #14 from kant/patch-2
alesanchezr Sep 14, 2022
94eb5e4
Merge branch 'master' into patch-1
alesanchezr Sep 14, 2022
5df1327
Merge pull request #13 from kant/patch-1
alesanchezr Sep 14, 2022
cfd9ebf
Github action validating integrity
tommygonzaleza Sep 14, 2022
e75e403
Update README.md
alesanchezr Oct 3, 2022
dd6d106
Update learn.json
alesanchezr Nov 18, 2022
4f322ae
correct the variables in spanish version
begonufer Feb 18, 2023
2e42f4e
Update README.md
alesanchezr Mar 31, 2023
d52d644
Update README.es.md
alesanchezr Mar 31, 2023
3f5d79c
Update README.es.md
alesanchezr Mar 31, 2023
fc531ca
the footnotes and templates were added
Lorenagubaira Apr 2, 2023
813f744
Merge pull request #20 from Lorenagubaira/excuse-generator-javascript
alesanchezr Apr 3, 2023
656bca2
Merge pull request #19 from begonufer/begonufernandez
alesanchezr Apr 3, 2023
59fc8be
Update learn.json
alesanchezr Apr 5, 2023
34b6a28
Update README.md
josemoracard May 31, 2023
93036db
Update README.md
josemoracard May 31, 2023
8916bfb
Update README.es.md
josemoracard May 31, 2023
ab16b4c
Update README.es.md
josemoracard May 31, 2023
d92fba9
Update README.es.md
josemoracard May 31, 2023
0249976
Update README.md
josemoracard May 31, 2023
0c8a695
Merge pull request #24 from josemoracard/jose1-readme
tommygonzaleza May 31, 2023
3478f79
Update README.md
josemoracard Jun 7, 2023
43fd3a1
Update README.es.md
josemoracard Jun 7, 2023
0ca6f42
Merge pull request #25 from josemoracard/jose1-README
tommygonzaleza Jun 7, 2023
cf09c2d
Update README.md
josemoracard Aug 23, 2023
0c106f6
Update README.md
josemoracard Aug 23, 2023
8240e79
Update README.md
josemoracard Aug 23, 2023
fd8edae
Update README.md
josemoracard Aug 23, 2023
bab4dfc
Update README.es.md
josemoracard Aug 23, 2023
839992c
Update learn.json
josemoracard Aug 23, 2023
3a918f4
Add files via upload
josemoracard Aug 23, 2023
047d2c9
Delete explanation.png
josemoracard Aug 23, 2023
b5e6728
Add files via upload
josemoracard Aug 23, 2023
ee485c6
Delete explanation.png
josemoracard Aug 23, 2023
b74fb88
Merge pull request #26 from josemoracard/jose1-README
tommygonzaleza Aug 23, 2023
75547c0
Update learn.json
alesanchezr Apr 29, 2024
816cc04
Update learn.json
alesanchezr Apr 29, 2024
68b98e7
Update README.es.md
Lorenagubaira Dec 23, 2024
727f99e
Update README.md
Lorenagubaira Dec 23, 2024
7d62cb5
Update learn.json
Lorenagubaira Dec 23, 2024
ae72fe9
Update learn.json
Lorenagubaira Jan 25, 2025
d34b2eb
Merge pull request #32 from breatheco-de/Lorenagubaira-patch-1
Lorenagubaira Jan 25, 2025
9838de9
Update learn.json
Lorenagubaira Jan 30, 2025
8ce1254
Merge pull request #33 from breatheco-de/Lorenagubaira-patch-2
Lorenagubaira Jan 30, 2025
cc041b0
Merge pull request #31 from Lorenagubaira/master
alesanchezr Feb 3, 2025
4182b13
Update README.md
alesanchezr Feb 3, 2025
7110221
Update README.md
rosinni Feb 4, 2025
69c6510
Update README.es.md
rosinni Feb 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/validate-integrity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Validate Integrity

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14.x'
- run: npm install @learnpack/learnpack -g
- run: learnpack audit
85 changes: 57 additions & 28 deletions README.es.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,75 @@
# ![alt text](https://assets.breatheco.de/apis/img/images.php?blob&random&cat=icon&tags=breathecode,32) The Excuse Generator
<!-- hide -->
# El Generador de Excusas
<!-- endhide -->

Disneyland para procrastinadores y perezosos.
Disneylandia para procrastinadores y perezosos.

Este proyecto es ideal para evitar que alguien se moleste, no toma más de 20 líneas de código y puede salvarlo por el resto de su vida.
Este proyecto es ideal para evitar alguien molestoso. No toma más de 20 líneas de código y puede salvarte por el resto de tu vida.

## La Meta
## Objetivo

Queríamos un proyecto que usara muy poco Javascript pero aún con una aplicación muy divertida, el generador de excusas toma
20 líneas de código, es super simple de entender y es el primer proyecto perfecto para cualquier desarrollador principiante.
Queríamos un proyecto que usara muy poco JavaScript, pero que tuviese una aplicación muy divertida, el generador de excusas toma 20 líneas de código, es super simple de entender y es el primer proyecto perfecto para cualquier desarrollador principiante.

## Instrucciones
## 📝 Instrucciones:

Cree un sitio web pequeño que genere una excusa cada vez que se presione un botón (vea la demostración de su mentor acerca de los detalles)
1. Por favor, crea un pequeño sitio web que genere una excusa cada vez que se refresca la página, debe verse así: [Vea la animación de demostración](https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/blob/master/preview.gif?raw=true).

Tiene que verse así: [Echa un vistazo a la animación de demostración.](https://projects.breatheco.de/json?slug=excuse-generator&preview).
## Discute con tus compañeros de clase la estrategia primero

## Pista
¿Cómo podemos generar una excusa? ¿Cómo se construyen las oraciones?

1. Cree un index.html con una excusa codificada, no js, solo una excusa en HTML puro y simple.
2. La excusa debe estar dentro de una etiqueta HTML que tenga un ID asignado, por ejemplo:
![explicación del generador de excusas](https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/blob/master/explanation.gif?raw=true)

¡La idea es generar cada parte de la oración al azar para encontrar grandes excusas!

<onlyfor saas="false" withBanner="false">

## 🌱 Cómo comenzar este proyecto

No clones este repositorio porque vamos a usar una plantilla diferente.

Recomendamos abrir el repositorio `vanillajs-hello` utilizando un entorno de desarrollo como [Codespaces](https://4geeks.com/es/lesson/tutorial-de-github-codespaces) (recomendado) o [Gitpod](https://4geeks.com/es/lesson/como-utilizar-gitpod). Alternativamente, puedes clonarlo en tu computadora local usando el comando `git clone`.

Este es el repositorio que necesitas abrir o clonar:

```text
https://github.com/4GeeksAcademy/vanillajs-hello
```

**👉 Por favor sigue estos pasos sobre** [cómo comenzar un proyecto de programación.](https://4geeks.com/es/lesson/como-comenzar-un-proyecto-de-codificacion).

</onlyfor>

## 💡 Pistas:

+ En el archivo `index.html` inventa una excusa nueva, sin JS, solo una excusa en HTML puro y simple.
+ La excusa debe estar dentro de una etiqueta HTML que tenga un `id` asignado, por ejemplo:
```html
<p id="excuse">My dog eat my homework</p>
<p id="excuse">My dog ate my homework</p>
```
3. Usando javascript, cree una función que genere y devuelva una excusa aleatoria con la siguiente estructura:
+ Usando JavaScript, crea una función que genere y devuelva una excusa aleatoria con la siguiente estructura:
```js
let who = ['the dog','my granma','his turtle','my bird'];
let what = ['eat','pissed','crushed','broked'];
let when = ['before the class','right in time','when I finished','during my lunch','while I was praying'];
let who = ['The dog', 'My grandma', 'The mailman', 'My bird'];
let action = ['ate', 'peed', 'crushed', 'broke'];
let what = ['my homework', 'my phone', 'the car'];
let when = ['before the class', 'when I was sleeping', 'while I was exercising', 'during my lunch', 'while I was praying'];
```
4. Para crear una excusa consistente, tiene que concatenar un elemento de cada matriz en el orden correcto.
5. Llame a esa función onLoad y establezca la excusa en el HTML interno del elemento HTML #excuse.

+ Para crear una excusa consistente, tienes que concatenar un elemento de cada array o arreglo en el orden correcto.
+ Usa la función `onload` y establece la excusa en el `innerHTML` del elemento HTML `#excuse`.

## Tecnologias
## Tecnologías

HTML, CSS3, Sass, Javascript, Webpack.
HTML, CSS3, JavaScript, Vite.

## Fundamentos

Este ejercicio cubre los siguientes fundamentos:
1. Usando archivos Javascript externos en tu proyecto.
2. Cómo trabajar con matrices.
3. Generando números al azar.
4. Cuerdas de concatenacion.
5. Usando funciones (al menos un poco).
6. Trabajando con eventos (al menos un poco).

1. Utilizar archivos JavaScript externos en tu proyecto.
2. Cómo trabajar con arreglos/listas (arrays).
3. Generar números al azar.
4. Concatenar strings (cadenas).
5. Utilizar funciones (al menos un poco).
6. Trabajar con eventos (al menos un poco).

Este y otros proyectos son usados para [aprender a programar](https://4geeksacademy.com/es/aprender-a-programar/aprender-a-programar-desde-cero) por parte de los alumnos de 4Geeks Academy [Coding Bootcamp](https://4geeksacademy.com/us/coding-bootcamp) realizado por [Alejandro Sánchez](https://twitter.com/alesanchezr) y muchos otros contribuyentes. Conoce más sobre nuestros [Cursos de Programación](https://4geeksacademy.com/es/curso-de-programacion-desde-cero?lang=es) para convertirte en [Full Stack Developer](https://4geeksacademy.com/es/coding-bootcamps/desarrollador-full-stack/?lang=es), o nuestro [Data Science Bootcamp](https://4geeksacademy.com/es/coding-bootcamps/curso-datascience-machine-learning).
69 changes: 46 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,75 @@
# ![alt text](https://assets.breatheco.de/apis/img/images.php?blob&random&cat=icon&tags=breathecode,32) The Excuse Generator
<!-- hide -->
# The Excuse Generator
<!-- endhide -->

Disneyland for procrastinators and lazy people.

This project is ideal to are avoiding someone annoying, it takes no more than 20 lines of code and it can save you for the rest of your life!
This project is ideal for avoiding someone annoying; it takes no more than 20 lines of code, and it can save you for the rest of your life!

## The Goal
## The Goal:

We wanted a project that used very little Javascript but still with a very fun application, the excuse generator takes
20 lines of code, is super simple to understand and is the perfect first project for any beginner developer.
We wanted a project that used very little JavaScript but still had a very fun application. The excuse generator takes 20 lines of code, is super simple to understand, and is the perfect first project for any beginner developer.

## Instructions
## 📝 Instructions:

Please create a small website that generates an excuse each time a button is pressed, it has to look like this: [Checkout the demo animation](https://projects.breatheco.de/json?slug=excuse-generator&preview).
1. Please create a small website that generates an excuse each time you refresh the page, it has to look like this: [Checkout the demo animation](https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/blob/master/preview.gif?raw=true).

## Discuss with your classmates the strategy first

How can we generate an excuse? How are sentences build?
How can we generate an excuse? How are sentences built?

![Excuse generator explanation](https://github.com/breatheco-de/projects/blob/master/p/javascript/beginner/excuse-generator/explanation.gif?raw=true)
![Excuse generator explanation](https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/blob/master/explanation.gif?raw=true)

The idea is to generate each part of the sentence randomly to come up with great excuses!

## Hint
<onlyfor saas="false" withBanner="false">

## 🌱 How to start this project

1. Create a index.html with one excuse hard-coded, no js, just one excuse in pure plain HTML.
2. The excuse must be inside an HTML tag that has an id assinged, for example:
Do not clone this repository because we are going to be using a different template.

We recommend opening the `vanillajs-hello` template using a provisioning tool like [Codespaces](https://4geeks.com/lesson/what-is-github-codespaces) (recommended) or [Gitpod](https://4geeks.com/lesson/how-to-use-gitpod). Alternatively, you can clone it on your local computer using the `git clone` command.

This is the repository you need to open or clone:

```text
https://github.com/4GeeksAcademy/vanillajs-hello
```

**👉 Please follow these steps on** [how to start a coding project](https://4geeks.com/lesson/how-to-start-a-project).

</onlyfor>

## 💡 Hints:

+ Update your `index.html` with one excuse hard-coded, no JS, just one excuse in pure plain HTML.
+ The excuse must be inside an HTML tag that has an `id` assigned, for example:
```html
<p id="excuse">My dog eat my homework</p>
<p id="excuse">My dog ate my homework</p>
```
3. Using javascript, create a function that generates and returns a random excuse with the following structure:
+ Using JavaScript, create a function that generates and returns a random excuse with the following structure:
```js
let who = ['the dog','my granma','his turtle','my bird'];
let what = ['eat','pissed','crushed','broked'];
let when = ['before the class','right in time','when I finished','during my lunch','while I was praying'];
let who = ['The dog', 'My grandma', 'The mailman', 'My bird'];
let action = ['ate', 'peed', 'crushed', 'broke'];
let what = ['my homework', 'my phone', 'the car'];
let when = ['before the class', 'when I was sleeping', 'while I was exercising', 'during my lunch', 'while I was praying'];
```
4. To create a consistent excuse you have to concatenate one item from each array in the proper order.
5. Call that function onLoad and set the excuse into the innerHTML of the #excuse HTML element.

+ To create a consistent excuse, you have to concatenate one item from each array in the proper order.
+ Call the function `onload` and set the excuse into the `innerHTML` of the `#excuse` HTML element.

## Technologies

HTML, CSS3, Sass, Javascript, Webpack.
HTML, CSS3, JavaScript, Vite.

## Fundamentals

This exercise covers the following fundamentals:
1. Using external Javascript files in your project.
2. How to work with Arrays.

1. Using external JavaScript files in your project.
2. How to work with arrays.
3. Generating random numbers.
4. Concatenating strings.
5. Using functions (at least a bit).
6. Working with events (at least a bit).

This and many other projects are built by students as part of the 4Geeks Academy [Coding Bootcamp](https://4geeksacademy.com/us/coding-bootcamp) by [Alejandro Sanchez](https://twitter.com/alesanchezr) and many other contributors. Find out more about our [Full Stack Developer Course](https://4geeksacademy.com/us/coding-bootcamps/part-time-full-stack-developer), and [Data Science Bootcamp](https://4geeksacademy.com/us/coding-bootcamps/datascience-machine-learning).
20 changes: 0 additions & 20 deletions bc.json

This file was deleted.

39 changes: 39 additions & 0 deletions learn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"gitpod": true,
"title": {
"us": "Code an Excuse Generator in JavaScript",
"es": "Generador de excusas en Javascript"
},
"slug": "excuse-generator",
"status": "published",
"video": {
"solution": {
"us": "https://www.youtube.com/watch?v=n43ORx4GMJ0"
}
},
"solution": "https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/tree/solution",
"duration": 4,
"template_url" : "https://github.com/4GeeksAcademy/vanillajs-hello",
"preview": "https://github.com/breatheco-de/tutorial-project-excuse-generator-javascript/blob/master/preview.gif?raw=true",
"translations": ["es", "us"],
"difficulty": "beginner",
"technologies": ["javascript", "html", "the-dom"],
"description": {
"us": "Disneyland for procrastinators! Create an Excuse Generator using just 20 lines of JavaScript. This beginner-friendly project teaches arrays, random number generation, and string concatenation while building a tool to generate excuses.",
"es": "¡Disneylandia para procrastinadores! Crea un generador de excusas utilizando solo 20 líneas de JavaScript. Este proyecto apto para principiantes enseña arreglos, generación de números aleatorios y concatenación de cadenas, mientras construyes una herramienta para generar excusas."
},
"talents": [
{ "badge": "indentator", "points": 6 },
{ "badge": "tag-master", "points": 3 },
{ "badge": "window-lover", "points": 3 },
{ "badge": "mouse-god", "points": 3 },
{ "badge": "source-inspector", "points": 5 },
{ "badge": "abc", "points": 5 },
{ "badge": "functional-developer", "points": 5 }
],
"autoPlay": false,
"projectType": "project",
"telemetry": {
"batch":"https://breathecode.herokuapp.com/v1/assignment/me/telemetry?asset_id=180"
}
}