Username registration authentication Javascript must return true or false if a new username already exists

I’m new to programming and would like to ask for help as to why my program is not working. When I run the checkName(); It just always returns true even if the input username is not in the lists yet or even when it already exists.

Instructions:
I have to create a function that will check if the username given by the user already exists. It must then return a true or a false.

Thank you!

let registeredUsers =  ["Xian","Sam","Gel", "Ian"];

let checkName = function() {
let username = prompt('Please enter username.');
let isExisting = registeredUsers.includes(username, 0);

    if (isExisting = true) {
        return true;
    } else {
        return false;
    }
}

checkName();

175 thoughts on “Username registration authentication Javascript must return true or false if a new username already exists”

  1. Write more, thats all I have to say. Literally, it
    seems as though you relied on the video to make your point.
    You obviously know what youre talking about, why waste
    your intelligence on just posting videos to your site when you could be giving us something informative to read?

    my site – Eggplant Explosion Review [Norine]

    Reply
  2. After checking out a handful of the blog articles on your site, I
    seriously like your way of blogging. I bookmarked it to
    my bookmark site list and will be checking back in the near future.
    Take a look at my web site too and tell me what you think.

    Reply
  3. Just desire to say your article is as astounding. The clarity for your publish is just nice and that i can suppose you are an expert in this subject.
    Fine together with your permission allow me to grab your feed to keep up
    to date with forthcoming post. Thanks one million and please carry on the enjoyable work.

    Reply
  4. You are so awesome! I do not believe I’ve read something like that before.
    So good to discover another person with original thoughts
    on this topic. Really.. many thanks for starting this up.
    This website is one thing that’s needed on the internet, someone
    with a bit of originality!

    Reply
  5. Have you ever considered about including a little bit more than just your articles?

    I mean, what you say is valuable and all. However think about if you added
    some great pictures or video clips to give your posts more,
    “pop”! Your content is excellent but with
    pics and videos, this website could definitely be one of the
    very best in its field. Amazing blog!

    Reply
  6. Wonderful blog! I found it while surfing around on Yahoo News.

    Do you have any tips on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Appreciate it

    Reply
  7. Hello there! This is my first visit to your blog! We are a collection of volunteers and starting a new initiative in a
    community in the same niche. Your blog provided us useful information to work on. You
    have done a outstanding job!

    Reply
  8. My brother recommended I might like this website.
    He was totally right. This post actually made my day.

    You can not imagine just how much time I had spent for this information! Thanks!

    Reply
  9. We are a group of volunteers and opening a new scheme in our community.
    Your web site offered us with valuable info to work on. You
    have done an impressive job and our entire community will be thankful to you.

    Reply
  10. I know this if off topic but I’m looking into starting my own blog and was wondering what
    all is needed to get setup? I’m assuming having a blog
    like yours would cost a pretty penny? I’m not
    very web smart so I’m not 100% sure. Any suggestions or
    advice would be greatly appreciated. Many thanks

    Reply
  11. Thanks for any other wonderful article. The place else may anyone get that type of info
    in such an ideal means of writing? I have a presentation subsequent
    week, and I am at the search for such info.

    Reply
  12. That is a good tip particularly to those new to the blogosphere.
    Brief but very precise information… Thank you
    for sharing this one. A must read post!

    Reply
  13. of course like your web site but you need to take a look at the spelling on quite a few of your posts.
    Many of them are rife with spelling issues and I to find it very troublesome to inform the truth then again I will surely come back again.

    Reply
  14. I like the helpful info you provide on your articles.
    I will bookmark your blog and check again right here regularly.
    I am somewhat certain I’ll be told lots of new
    stuff proper right here! Best of luck for the following!

    Reply
  15. I like the valuable information you provide in your articles.
    I will bookmark your weblog and check again here frequently.

    I’m quite certain I’ll learn many new stuff right here! Best of luck for the next!

    Reply
  16. Aw, this was an incredibly nice post. Finding the time and actual effort
    to make a very good article… but what can I say…
    I hesitate a whole lot and never seem to get nearly anything
    done.

    Reply
  17. My brother recommended I may like this blog. He used to be
    totally right. This publish actually made my day. You cann’t consider simply how much time I had spent
    for this information! Thanks!

    Reply
  18. Hi, I do think this is an excellent blog.
    I stumbledupon it 😉 I will come back yet again since I book-marked it.
    Money and freedom is the greatest way to change, may you be rich and continue
    to help others.

    Reply
  19. I am extremely impressed with your writing skills as well
    as with the layout on your blog. Is this a paid theme or
    did you modify it yourself? Anyway keep up the excellent quality writing, it
    is rare to see a great blog like this one today.

    Reply
  20. Great post. I used to be checking continuously this blog and I’m impressed!
    Extremely useful info specifically the closing phase 🙂 I handle such info much.
    I used to be looking for this certain information for
    a long time. Thanks and best of luck.

    Reply
  21. Howdy! Do you know if they make any plugins to assist with
    SEO? I’m trying to get my blog to rank for some targeted keywords but I’m not
    seeing very good success. If you know of any please share.
    Kudos!

    Reply
  22. Excellent pieces. Keep posting such kind of information on your
    page. Im really impressed by your blog.
    Hello there, You have performed an incredible job.

    I will definitely digg it and in my view recommend to my friends.
    I’m confident they will be benefited from this website.

    Reply
  23. Wow that was odd. I just wrote an really long comment but after I clicked submit my
    comment didn’t show up. Grrrr… well I’m
    not writing all that over again. Anyways, just wanted
    to say excellent blog!

    Reply
  24. Hello, I think your blog might be having browser compatibility issues.
    When I look at your blog site in Chrome, it looks fine but when opening in Internet Explorer,
    it has some overlapping. I just wanted to give you a quick heads
    up! Other then that, amazing blog!

    Reply
  25. This design is spectacular! You most certainly know how to keep a reader
    entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Fantastic job.
    I really loved what you had to say, and more than that, how you presented it.
    Too cool!

    Reply
  26. When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get three e-mails with the same comment.
    Is there any way you can remove people from that service?
    Thanks!

    Reply
  27. What’s up to every body, it’s my first pay a quick
    visit of this web site; this webpage includes remarkable and genuinely fine
    data designed for visitors.

    Reply
  28. always i used to read smaller articles that as well clear their motive,
    and that is also happening with this post which I am
    reading at this place.

    Reply
  29. Nice blog! Is your theme custom made or did you download it from
    somewhere? A theme like yours with a few simple adjustements would really make my blog
    shine. Please let me know where you got your design. Kudos

    Reply
  30. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point.
    You clearly know what youre talking about, why throw away
    your intelligence on just posting videos to your site when you could be giving us something informative to read?

    Reply
  31. You could certainly see your skills in the work you write.
    The sector hopes for more passionate writers such as you who
    are not afraid to mention how they believe.
    Always go after your heart.

    Take a look at my web blog – poker online

    Reply
  32. You actually make it seem so easy with your presentation but I find
    this topic to be really something that I think I would never understand.
    It seems too complicated and extremely broad for me.

    I am looking forward for your next post, I will try to get
    the hang of it!

    Reply
  33. Hi, I do believe this is an excellent site. I stumbledupon it 😉
    I’m going to return once again since I book-marked it.
    Money and freedom is the best way to change, may you be rich and
    continue to guide others.

    Reply
  34. If some one wishes expert view on the topic of blogging and site-building afterward i suggest
    him/her to pay a quick visit this blog, Keep up the pleasant
    work.

    Reply
  35. Hi there, I found your blog by means of Google even as searching
    for a similar subject, your web site came up, it appears to be like good.

    I’ve bookmarked it in my google bookmarks.

    Hi there, simply turned into alert to your blog through Google, and found that it’s really informative.
    I am gonna be careful for brussels. I will be grateful if you happen to continue this {in future}.
    Many folks will probably be benefited out of your writing.
    Cheers!

    Reply
  36. Hi there to all, how is everything, I think every one is getting more
    from this web site, and your views are pleasant designed for new people.

    Reply
  37. We stumbled over here from a different web page and thought
    I should check things out. I like what I see so now i’m
    following you. Look forward to exploring your web page for a second time.

    Reply
  38. This design is steller! You certainly know how to keep a reader amused.
    Between your wit and your videos, I was almost moved to start my own blog (well,
    almost…HaHa!) Excellent job. I really loved what you had to say, and more than that, how
    you presented it. Too cool!

    Reply
  39. Hi, I do think this is an excellent blog. I stumbledupon it 😉 I’m
    going to return once again since i have bookmarked it.
    Money and freedom is the best way to change, may you be rich and continue
    to help others.

    Reply
  40. Terrific work! This is the kind of information that should be shared across the internet.
    Disgrace on the seek engines for now not positioning
    this post higher! Come on over and discuss with my website
    . Thank you =)

    Reply
  41. I would like to thank you for the efforts you’ve put in penning this website.
    I’m hoping to view the same high-grade blog posts by you later on as well.
    In fact, your creative writing abilities has inspired me to get
    my own, personal site now 😉

    Reply
  42. Have you ever thought about writing an ebook or guest authoring on other websites?

    I have a blog centered on the same ideas you discuss and would love to
    have you share some stories/information. I know my readers would value your work.
    If you are even remotely interested, feel free to shoot me an e mail.

    Reply
  43. Hey! Someone in my Myspace group shared this website with us so I came to take a
    look. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this
    to my followers! Superb blog and brilliant style and design.

    Reply
  44. I do trust all the ideas you have presented for your post.
    They’re really convincing and can definitely work.
    Still, the posts are very quick for newbies. May you please lengthen them a little from subsequent time?
    Thank you for the post.

    Reply
  45. Hi there, just became alert to your blog through Google, and found
    that it’s really informative. I am gonna watch out for brussels.

    I’ll appreciate if you continue this in future. Many people will be
    benefited from your writing. Cheers!

    Reply
  46. Good day I am so thrilled I found your weblog, I really found you by accident, while I was searching
    on Yahoo for something else, Anyways I am here now and would just
    like to say thanks for a incredible post and a all round
    entertaining blog (I also love the theme/design), I
    don’t have time to read it all at the minute but I have book-marked it and also
    added your RSS feeds, so when I have time I will be back to read a great
    deal more, Please do keep up the fantastic work.

    Reply
  47. I’m curious to find out what blog system you’re working with?
    I’m having some minor security issues with my latest site and I’d
    like to find something more safe. Do you have any solutions?

    Reply
  48. Thank you, I’ve just been looking for information about this subject for a
    long time and yours is the best I’ve discovered so far. However,
    what concerning the conclusion? Are you positive about the source?

    Reply
  49. Hi! Someone in my Myspace group shared this website with us so I came to give it a look.
    I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers!

    Excellent blog and wonderful design.

    Reply
  50. You can definitely see your enthusiasm in the article
    you write. The arena hopes for even more passionate
    writers such as you who aren’t afraid to mention how they believe.
    At all times go after your heart.

    Reply
  51. Heya just wanted to give you a brief heads up and let you know
    a few of the pictures aren’t loading properly.
    I’m not sure why but I think its a linking issue.

    I’ve tried it in two different internet browsers and both show
    the same outcome.

    Reply
  52. I like the valuable information you supply in your articles.

    I will bookmark your blog and check once more right here frequently.
    I’m quite certain I’ll be told plenty of new stuff right here!
    Best of luck for the following!

    Reply
  53. I’m curious to find out what blog platform you’re working with?
    I’m experiencing some small security issues with my latest
    blog and I would like to find something more
    risk-free. Do you have any recommendations?

    Reply
  54. Hello i am kavin, its my first occasion to commenting anyplace, when i read this article i thought i could also make comment due
    to this brilliant post.

    Reply
  55. What i do not realize is in truth how you’re not
    actually a lot more smartly-appreciated than you might be
    now. You’re so intelligent. You understand thus significantly in terms of this matter, made
    me individually believe it from a lot of various
    angles. Its like women and men aren’t involved unless it
    is one thing to do with Lady gaga! Your personal stuffs great.
    Always handle it up!

    Reply
  56. Nice blog here! Also your website loads up fast!
    What web host are you using? Can I get your affiliate link to your
    host? I wish my web site loaded up as fast as yours lol

    Reply
  57. Hey there! This is my first comment here so I just wanted to give a quick shout out and say I genuinely enjoy reading your blog posts.

    Can you recommend any other blogs/websites/forums
    that cover the same subjects? Thank you!

    Reply
  58. Having read this I thought it was extremely enlightening.
    I appreciate you taking the time and effort to put this content together.
    I once again find myself spending a significant amount of time both reading and leaving comments.

    But so what, it was still worth it!

    Reply
  59. Hi there, You’ve done a fantastic job.
    I’ll certainly digg it and personally suggest to my friends.

    I am sure they’ll be benefited from this web site.

    Reply
  60. My partner and I stumbled over here from a different page and thought I may
    as well check things out. I like what I see so now
    i am following you. Look forward to looking
    over your web page again.

    Reply
  61. I’m really enjoying the design and layout of your site.

    It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a designer
    to create your theme? Exceptional work!

    Reply
  62. Excellent way of explaining, and pleasant article to get facts concerning my presentation subject matter, which i am going to convey in institution of higher education.

    Reply
  63. I’d like to thank you for the efforts you’ve put in writing this blog.
    I am hoping to check out the same high-grade blog posts from you in the future as well.
    In fact, your creative writing abilities has encouraged
    me to get my very own website now 😉

    Reply
  64. I’m truly enjoying the design and layout of your blog.
    It’s a very easy on the eyes which makes it much more enjoyable
    for me to come here and visit more often. Did you hire out a designer to
    create your theme? Exceptional work!

    Reply
  65. This is the right website for anyone who would like to find out
    about this topic. You know a whole lot its almost hard to
    argue with you (not that I personally would want to…HaHa).
    You definitely put a brand new spin on a subject which has been written about
    for many years. Excellent stuff, just excellent!

    Reply
  66. Hi, i think that i saw you visited my blog thus i came to “return the favor”.I’m
    attempting to find things to improve my website!I suppose
    its ok to use some of your ideas!!

    Reply
  67. Fantastic beat ! I wish to apprentice even as you amend your website, how could i subscribe for a weblog website?
    The account aided me a acceptable deal. I have been tiny bit acquainted of this your
    broadcast offered shiny transparent concept

    Reply
  68. I wanted to thank you for this good read!! I definitely enjoyed every bit of it.
    I have got you bookmarked to check out new things you post…

    Reply
  69. I loved as much as you’ll receive carried out right here.
    The sketch is tasteful, your authored subject matter stylish.
    nonetheless, you command get bought an edginess over that you wish be delivering the following.
    unwell unquestionably come further formerly again as exactly the
    same nearly a lot often inside case you shield this
    increase.

    Reply
  70. hey there and thank you for your information – I’ve definitely picked
    up something new from right here. I did however expertise a few
    technical issues using this web site, as I experienced to reload the web site many
    times previous to I could get it to load correctly. I had been wondering
    if your hosting is OK? Not that I’m complaining, but slow loading instances times will sometimes affect
    your placement in google and could damage your high quality score if ads and marketing with Adwords.
    Well I am adding this RSS to my e-mail and can look out for a lot more of your respective interesting content.
    Make sure you update this again soon.

    Reply
  71. I know this if off topic but I’m looking into starting my own blog and was curious what all is needed to get set up?

    I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very web savvy so I’m not 100% sure.
    Any recommendations or advice would be greatly appreciated.

    Appreciate it

    Reply
  72. Pretty portion of content. I just stumbled upon your weblog
    and in accession capital to assert that I get actually enjoyed
    account your weblog posts. Any way I will be subscribing for your augment and even I fulfillment you get
    entry to persistently fast.

    Reply
  73. Thanks for your marvelous posting! I quite enjoyed reading it, you could be a great author.
    I will always bookmark your blog and definitely will come
    back sometime soon. I want to encourage yourself to continue your great writing, have a nice
    afternoon!

    Reply
  74. Hmm it looks like your website ate my first comment (it was extremely long) so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog.
    I too am an aspiring blog writer but I’m still new to everything.

    Do you have any suggestions for rookie blog writers?

    I’d definitely appreciate it.

    Reply
  75. I used to be recommended this website by way of my cousin. I’m no longer certain whether this put up is written by means of him as nobody else recognise such unique about
    my problem. You’re amazing! Thanks!

    Reply
  76. Nice blog! Is your theme custom made or did you download it
    from somewhere? A theme like yours with a few simple adjustements
    would really make my blog jump out. Please let me know where
    you got your theme. Thanks

    Reply
  77. I am now not sure where you’re getting your information,
    but good topic. I must spend a while finding out much more or working out more.

    Thanks for wonderful info I was looking for this info for my mission.

    Reply
  78. I don’t know if it’s just me or if perhaps everybody else encountering
    problems with your site. It seems like some of the text in your posts are running off the
    screen. Can someone else please provide feedback and
    let me know if this is happening to them as well?
    This could be a problem with my browser because I’ve had this
    happen before. Thank you

    Reply
  79. Its such as you learn my thoughts! You appear to grasp so much about this, like you wrote the book in it or something.
    I feel that you just could do with a few % to pressure the message house a bit, but other than that,
    that is excellent blog. A great read. I will certainly be
    back.

    Reply
  80. Hello! Someone in my Myspace group shared this site
    with us so I came to take a look. I’m definitely loving the information. I’m book-marking and will
    be tweeting this to my followers! Superb blog and amazing design and style.

    Reply
  81. There are a few points to be considered when you are searching for the right baccarat Singapore.
    Slots, poker, blackjack, roulette? There are many casinos that
    offer a variety of games. But, not every casino offer the games you’re looking for.
    Make sure the casino you’re interested in has the type of
    games you want to play.

    Reply
  82. Are you seeking an exciting and thrilling way to
    bet? If so, then take a look at an online casino located in Singapore!
    Online casinos offers many advantages over traditional land-based casinos.

    For starters, you can play at the convenience of your own home or
    office. In addition, there is no cost for travel that are required to play in the casino online.
    Another advantage of gambling in an online casino are the
    promotions and bonuses that are offered.

    Reply
  83. Hello! This is kind of off topic but I need some guidance from an established blog.
    Is it difficult to set up your own blog? I’m not very
    techincal but I can figure things out pretty fast.
    I’m thinking about creating my own but I’m not sure where to begin. Do you have any points
    or suggestions? With thanks

    Reply

Leave a Comment