Skip to content

Conversation

chris34096
Copy link

No description provided.

- `What?! You both got the same name?`
*/

if (hacker1.localeCompare < hacker2) {

Choose a reason for hiding this comment

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

la methode localCompare() s'écrit comme ceci:
hacker1.localeCompare(hacker2).
Cela va te retourner un numero entre -1 et 1. si c'est -1 c'est que hacker2 est supérieur a hacker1, si c'est 1 c'est l'inverse et si c'est 0 c'est une égalité.
donc tu fais une if(hacker1.localeCompare(hacker2)) {} else if(hacker2.localeCompare(hacker1)) {} else {}

@ta-web-paris
Copy link

Bien joué ! C'est pas mal du tout, continue comme ca !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy