Skip to content

Update index.js #2686

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update index.js #2686

wants to merge 2 commits into from

Conversation

Driztnafein
Copy link

No description provided.

let hacker1 = "Julio";
console.log("The driver's name is " + hacker1);

let hacker2 = "Christian";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let hacker2 = "Christian";
const hacker2 = "Cristian";

Siempre que puedas const (lo del nombre es coña, pero es que se escribe sin la h jejeje xD)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cierto!! Cont const!! Y lo de Christian es por que el de mi hermano se escribe con h....deberiais juntaros todos los Chri/Cristians del mundo y aclararos.

@@ -1,7 +1,53 @@
// Iteration 1: Names and Input

let hacker1 = "Julio";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let hacker1 = "Julio";
const hacker1 = "Julio";

index.js Outdated
} else if (hacker1.length < hacker2.length) {
console.log("It seems that the navigator has the longest name, it has " + hacker2.length + " characters.");
} else {
console.log("Wow, you both have equally long names, " + hacker1.length + " characters!");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log("Wow, you both have equally long names, " + hacker1.length + " characters!");
console.log("Wow, you both have equally long names, " + hacker1.length + " characters!");

Esto esta perfect pero si tuvieras que usar la interpolacion como lo harias??

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asi jejeje!
console.log(Wow, you both have equally long names, ${hacker1.length} characters!);

const words = longText.split(" ");

for (let i = 0; i < words.length; i++) {
const word = words[i].trim();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const word = words[i].trim();
const word = words[i];

Esto precisamente con el split de antes no te haria falta el trim :D

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me pasa por pecar de listo. Era para asegurame de que no hubiera espacios adicionales al principio o al final del texto. Pero cierto. Está de más ;)

@stale
Copy link

stale bot commented Jul 15, 2023

This pull request has been automatically marked as stale because it didn't have any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants