Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Find a Name | Searching and Filtering Arrays
Quizzes & Challenges
Quizzes
Challenges
/
C# Arrays

bookChallenge: Find a Name

Tâche

Swipe to start coding

Practice searching arrays by checking if a specific name exists in a list of registered users. Complete the NameExists function so that it returns true if the targetName is found in the users array, and false otherwise.

To complete this task, follow these steps:

  • Loop through each element in the users array.
  • Compare each element with the targetName.
  • If a match is found, return true.
  • If the end of the array is reached without finding a match, return false.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 2
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

Can you explain this in simpler terms?

What are the main benefits or drawbacks?

Can you give me a real-world example?

close

bookChallenge: Find a Name

Glissez pour afficher le menu

Tâche

Swipe to start coding

Practice searching arrays by checking if a specific name exists in a list of registered users. Complete the NameExists function so that it returns true if the targetName is found in the users array, and false otherwise.

To complete this task, follow these steps:

  • Loop through each element in the users array.
  • Compare each element with the targetName.
  • If a match is found, return true.
  • If the end of the array is reached without finding a match, return false.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 2
single

single

some-alt