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
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.
confirm
Some statement with cancel & ok buttons.
ok -> true, cancel -> false
Leave y'r thoughts....
Top comments (0)