Created
February 22, 2023 10:23
-
-
Save seanwiseman/5811810dd38d4f0af44a25b9615fd5d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Username check (part 1): | |
| We need a function called `doesUserExist` that will accept a user's username (string) and return a boolean value stating | |
| if the user already exists for our check. | |
| `hint` - maybe take a look at https://www.w3schools.com/jsref/jsref_includes_array.asp . | |
| For now use these usernames to check against: | |
| const usernames = [ | |
| "seanyboy", | |
| "loucat", | |
| "jakethesnake", | |
| ]; | |
| Here are some examples that sound work: | |
| > doesUserExist("seanyboy") | |
| true | |
| > doesUserExist("newkid") | |
| false | |
| > doesUserExist("loucat") | |
| true | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment