Skip to main content

Random Name Picker created in Minutes!

Last night I told ChatGPT, “I want to make a webpage that will pick a random name from a list.”

In seconds, it delivered this to my phone:


This morning I fed it the suggestions below until I got what I wanted:

Is there a way for me to submit a list of names into the website and then it pick a random name?

I’d like the selected name to be displayed larger and at the top of the page. Can you add some CSS to give the page more style?

Instead of each name being separated by a comma, can this page be changed so the user submits the names with one name on each line?

When the submit button is pressed, can the page first display a random half of the names quickly one right after another and then end on the final one?

Can you double the selected name’s size?

Is there a way that the submitted names could be saved so that the user still has the last set of names they submitted from a previous browsing session?

If there are no names loaded in localStorage, can the page load with ten names to demonstrate the page? I’d like the ten names to be the first names of famous scientists.

I’d like to change the button title to Select Name. Also, can you add instructions above the bottom that explain to the user that they can replace the names in the box with their own but that they need to put one name on each line?

Can you add 10 more names to the defaultNames?

Here is the final product for you to try.