diff --git a/1-js/02-first-steps/09-alert-prompt-confirm/article.md b/1-js/02-first-steps/09-alert-prompt-confirm/article.md index c14e0c85..8ba414e9 100644 --- a/1-js/02-first-steps/09-alert-prompt-confirm/article.md +++ b/1-js/02-first-steps/09-alert-prompt-confirm/article.md @@ -30,7 +30,7 @@ The function `prompt` accepts two arguments: result = prompt(title, [default]); ``` -It shows a modal window with a text message, an input field for the visitor, and the buttons OK/CANCEL. +It shows a modal window with a text message, an input field for the visitor, and the buttons OK/Cancel. `title` : The text to show the visitor. @@ -38,7 +38,7 @@ It shows a modal window with a text message, an input field for the visitor, and `default` : An optional second parameter, the initial value for the input field. -The visitor may type something in the prompt input field and press OK. Or they can cancel the input by pressing CANCEL or hitting the `key:Esc` key. +The visitor may type something in the prompt input field and press OK. Or they can cancel the input by pressing Cancel or hitting the `key:Esc` key. The call to `prompt` returns the text from the input field or `null` if the input was canceled. @@ -74,7 +74,7 @@ The syntax: result = confirm(question); ``` -The function `confirm` shows a modal window with a `question` and two buttons: OK and CANCEL. +The function `confirm` shows a modal window with a `question` and two buttons: OK and Cancel. The result is `true` if OK is pressed and `false` otherwise. @@ -94,10 +94,10 @@ We covered 3 browser-specific functions to interact with visitors: : shows a message. `prompt` -: shows a message asking the user to input text. It returns the text or, if CANCEL or `key:Esc` is clicked, `null`. +: shows a message asking the user to input text. It returns the text or, if Cancel button or `key:Esc` is clicked, `null`. `confirm` -: shows a message and waits for the user to press "OK" or "CANCEL". It returns `true` for OK and `false` for CANCEL/`key:Esc`. +: shows a message and waits for the user to press "OK" or "Cancel". It returns `true` for OK and `false` for Cancel/`key:Esc`. All these methods are modal: they pause script execution and don't allow the visitor to interact with the rest of the page until the window has been dismissed.