prompt() call in code example does not fire #36172
Labels
closed: duplicate
This issue or pull request already exists
Content:Learn:JavaScript
Learning area JavaScript docs
MDN URL
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Strings
What specific section or headline is this issue about?
Concatenation in context
What information was incorrect, unhelpful, or incomplete?
The demo code uses
prompt()
to demonstrate concatenation. However, when the button is clicked, the prompt call from the code snippet context is ignored, and the displayed message immediately becomes "Hello null, nice to see you!“Chromium browsers log: "Ignored call to 'prompt()'. The document is sandboxed, and the 'allow-modals' keyword is not set."
What did you expect to see?
A pop-up prompt asking "What is your name?"
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/learn/javascript/first_steps/strings
The text was updated successfully, but these errors were encountered: