DEV Community

Avinashd
Avinashd

Posted on

Js in bits - 6(Interaction)

Learning js should be fun. It is fun if it's easy.
I tried my best in writing this, to understand it the easy way.

Interaction
There are 3 default interactions provided by js. All 3 of them are modals.
If any of them are triggered, it will stop the interactivity on the rest of the page.

alert
Gives some statement with ok button

Image description

prompt
A question with input to add the answer & ok button
An optional parameter can be given, with the question.

input given by user will always be in a string format.

Image description

confirm
Some statement with cancel & ok buttons.
ok -> true, cancel -> false

Image description

Leave y'r thoughts....

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay