en.javascript.info/1-js/02-first-steps/06-alert-prompt-confirm/1-simple-page/solution.md

24 lines
280 B
Markdown

JavaScript-code:
```js demo run
let name = prompt("What is your name?", "");
alert(name);
```
The full page:
```html
<!DOCTYPE html>
<html>
<body>
<script>
'use strict';
let name = prompt("What is your name?", "");
alert(name);
</script>
</body>
</html>
```