Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions lab-01/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<title>Dan's Test Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script src="main.js"></script>-->
</head>
<body>
<h1>Heading</h1>
<h3 id='blue'>Heading 3</h3>
<p class='green'>Paragraph</p>
<p class='green'>New paragraph</p>
<p>anoter paragraph new word</p>
<h1>Questions</h1>
<h3 id='blue'>Just to recap the questions in case you forgot</h3>
<p class='green'> What's your first name?</p>
<p class='green'> What's your last name?</p>
<p>Where are you from?</p>
<p>What is your favorite food?</p>
<span>span</span>
<span>Another Span</span>
<span>Thanks for stopping by </span>
</body>
</html>
33 changes: 27 additions & 6 deletions lab-01/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
// let name = prompt("What\'s your name");
// let origin = prompt('Where are you from?')
let coder = confirm('are you a coder?')
//# Technical Requirements

//xxx - You may do the work in the same HTML file that we used for our class demo today. Because the originals from class are saved in the class GitHub repo, there is no worry in overwriting them or need for saving an unnecessary extra copy.
//xxx - Using a total of four JavaScript 'prompt' or 'confirm' statements along the lines of our class demo from today, have a user answer four questions.
//xxx - The user's response to each question (input) should be stored in a separate variable. Name your variables carefully.
//XXX - Using these responses, return an alert to the user (output) that concatenates their response into some kind of reply like we did in class.
//XXX- Strive to have your alert for each question utilize the responses to all of the prior questions such that by the fourth question, your response would look something like, "Greetings, *Iggy* from *Ipanema*, I also like to eat *bananas* while on vacation in *Paris*."
// XXX- Be creative and have fun with your questions/responses! They can be whatever you want so long as the input/output requirements are met.
// XXX- In addition, for each response, create a console.log() message that indicates the nature of the question and the user's response, as we did in class.
// - In the HTML portion of the file, place the four questions within a series of <p> tags so that they are listed on the screen.
// - If there are any lingering issues with the setup or functionality of your laptop and the software installations, we need to individually address that right away.

let firstName = prompt("Hello, what\'s your first name?");
console.log (" User's First Name = " + firstName)

let lastName = prompt('What\'s your last name?')
console.log (" User's Last Name = " + lastName)

let origin = prompt('Where are you from?')
console.log (" User's hometown or origin = " + origin)

let favFood = prompt('What is your favorite food?')
console.log (" User's favorite food = " + favFood)

let confirm = alert('Hello ' + firstName + lastName + ' from ' + origin + ' I like ' + favFood + ' too ')
console.log ('Concatenates Users input =' + confirm)


console.log(coder)
// console.log(name);
// console.log(origin)