Dialog Box JavaScript Help

What's the JavaScript that would open the dialog boxes, ask for an input, wanting a confirmation, choose from list, etc.

I would like to use this in a project.

untitled script pic (8)
I don't know how to get a "choose from list" thing

That could be useful, but I am talking about these.
image

Also, what I am by "choose by list" is pick a option from a list.

I don't know how to do that. And I knew what you meant by "choose from list", but I didn't know how to do it in JavaScript.

this is what I wanted to do when I found out you can open dialogs in snap, at least I didn't need to make a topic about it