Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2c983b7
Updated code for median.js to pass the late expectations
Jul 20, 2026
6c109e9
Added code to dedupe.js
Jul 20, 2026
d57add3
added code for max.js
Jul 20, 2026
e3befbb
Added code to sum.js
Jul 20, 2026
872ddf0
modified code on includes.js to use a for...of loop
Jul 21, 2026
6c28930
Changed code in address. js to specify houseNumber
Jul 21, 2026
bbf0a73
Updated code and added notes for author.js
Jul 21, 2026
5c2b4b5
update the code and added notes to recipe.js
Jul 21, 2026
663412b
Added code and tests for contains.js
Jul 23, 2026
4c0d767
added code to lookup.test
Jul 23, 2026
827b052
added code and passed tests for querystring.test.js
Jul 28, 2026
2c0a94c
added code and tests for tally.test and js
Jul 28, 2026
f583fd7
updated tests output for tally.test
Jul 29, 2026
93df342
added answers to invert.js and added a .test.js page to
Jul 29, 2026
1461d83
Changed title element in index to ' Alarm Clock App'
Jul 29, 2026
7d18e63
Update code for "alarmclock.js"
Jul 29, 2026
c3f2ae0
added line in alarmclock.js
Jul 29, 2026
6c5b139
Added title in quotes.index.html
Jul 29, 2026
09a5ef1
added code to alarmclock
Jul 29, 2026
aded465
Updated code for alarmclock.js
Aug 1, 2026
206e8fd
random quotes generated on click
Aug 5, 2026
1b6ad5d
show random quote on load.
Aug 5, 2026
aa49cbc
add code for the style.css and added a container element index.htlm
Aug 6, 2026
25c1577
Removed code from previous print to pass criteria
Aug 6, 2026
9595142
Merge branch 'main' into quote-generator
JorvanW Aug 6, 2026
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
11 changes: 8 additions & 3 deletions Sprint-3/quote-generator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Title here</title>
<title>Quote generator app</title>
<link rel="stylesheet" href="style.css">
<script defer src="quotes.js"></script>
</head>
<body>
<h1>hello there</h1>
<p id="quote"></p>
<div class="container">

<h1>Random Quote Generator</h1>
<p id="quote"> </p>
<p id="author"></p>
<button type="button" id="new-quote">New quote</button>

</div>
</body>
</html>
18 changes: 18 additions & 0 deletions Sprint-3/quote-generator/quotes.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
const getQuoteButton = document.getElementById("new-quote");
const quoteParagraph = document.getElementById("quote");
const authorParagraph = document.getElementById("author");
console.log(getQuoteButton)

function getQuote(){
const randomNum = Math.floor(Math.random() * quotes.length);
const randomQuoteObj = quotes[randomNum];
const quote = randomQuoteObj.quote;
const author = randomQuoteObj.author;

quoteParagraph.textContent = quote;
authorParagraph.textContent = author;
}

getQuoteButton.addEventListener("click", getQuote)
// DO NOT EDIT BELOW HERE

// pickFromArray is a function which will return one item, at
Expand Down Expand Up @@ -491,3 +507,5 @@ const quotes = [
];

// call pickFromArray with the quotes array to check you get a random quote

getQuote();
62 changes: 61 additions & 1 deletion Sprint-3/quote-generator/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,61 @@
/** Write your CSS in here **/
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;

background-color: #dcc4c4;
font-family: Arial, sans-serif;
}


.container {
width: 550px;
height: 550px;

background-color: white;

display: flex;
flex-direction: column;
justify-content: center;
align-items: center;

padding: 30px;

text-align: center;

border-radius: 15px;
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}


h1 {
font-size: 1.8rem;
margin-bottom: 30px;
}


#quote {
font-size: 1.2rem;
margin-bottom: 20px;
}


#author {
font-style: italic;
margin-bottom: 30px;
color: #d9b11f;
}


button {
padding: 12px 25px;

border: none;
border-radius: 8px;

background-color: #222;
color: white;

cursor: pointer;
}
Empty file added prep/mean.js
Empty file.
Empty file added prep/mean.test.js
Empty file.
Empty file added prep/parse-query-string.js
Empty file.
7 changes: 7 additions & 0 deletions prep/parse-query-string.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test("given a query string with no query parameters, returns an empty object", function () {
const input = "";
const currentOutput = parseQueryString(input);
const targetOutput = {};

expect(currentOutput).toEqual(targetOutput);
});
Loading