JavaScript JavaScript Basics Storing and Tracking Information with Variables Capturing Visitor Input and Writing It to the Page

Can’t figure this one out

?

scripts.js
var answer = ("What day is it?");
index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
<script src="scripts.js"></script>
</body>
</html>

3 Answers

Nils Kriedner
Nils Kriedner
Front End Web Development Techdegree Student 19,060 Points

Hi Rufus,

you forgot the prompt.... ;-)

You use prompt like this (for example):

var question = prompt("Who are you?");

Hope that helps. Feel free to ask again if not!

Happy coding, Nils

PS: You can upvote my post and/or mark as "best answer" (at the bottom of my post) if it helped you. :-)

Thanks, that works!

Melody Olivera
Melody Olivera
1,720 Points

var answer = prompt ('What day is it?')