Skip to content

Instantly share code, notes, and snippets.

@seanwiseman
Created February 22, 2023 10:23
Show Gist options
  • Select an option

  • Save seanwiseman/5811810dd38d4f0af44a25b9615fd5d2 to your computer and use it in GitHub Desktop.

Select an option

Save seanwiseman/5811810dd38d4f0af44a25b9615fd5d2 to your computer and use it in GitHub Desktop.
/*
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