Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MEX-PT2 Rodrigo & Patricia#446

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Ritrex wants to merge1 commit intoironhack-labs:masterfromRitrex:master

Conversation

Ritrex
Copy link

No entendimos como usar el comparelocale

@ta-web-mex
Copy link

:warnig: Este no es ssu codigo pero les puede dar una idea de como se resuelve con el localcompare podrian haber solo comparado el length de los strings

switch( true ) {  case (lex < 0):     console.log(`The driver's name goes first`);    break;  case (lex > 0):    console.log(`Yo, the navigator goes first definitely`);    break;  case (lex == 0):    console.log(`What?! You both got the same name?`);    break;}```

@Ritrex
Copy link
Author

me imageine que ice algo mal en el pull request
anexo el código nuestro sólo por si acaso

let nav=hacker2
let pmenosl=""
if(driver.length>nav.length){
console.log("The Driver has the longest name, it has "+driver.length+" characters")
pmenosl=nav
} else if(driver.length<nav.length){
console.log("Yo, navigator got the longest name, it has "+nav.length+" characters")
pmenosl=driver
} else{
console.log("wow, you both got equally long names, "+driver.length+" characters!!")
pmenosl=nav
}

var cap=""
for(var j=0;j<driver.length;j++)
cap+=" "+driver[j].toUpperCase()
console.log(cap)

var rev=""
for(var i=0;i<nav.length;i++)
rev+=nav[nav.length-1-i]

let alpha=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
console.log(rev)
let d=n=""
for(l=0;l<driver.length;l++)
if(driver[l].match(/[a-z,A-Z]/i))
d+=driver[l]

for(m=0;m<nav)

for(k=0;k<pmenosl.length;k++)
if()
//Bonus
resb=true
for(var h=0;h<palabra.length;h++)
if(palabra[palabra.length-1-h]!==plabra[h])

if(resb)
console.log("la palabra es palindromo")
else
console.log("la palabra no es palindromo")

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Ritrex@ta-web-mex

[8]ページ先頭

©2009-2025 Movatter.jp