Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
aeabc14
Fix the bug in address.js file
Nov 14, 2025
26642e0
Fix the bug in author.js file
Nov 14, 2025
ab693e3
Fix the bug in recipe.js file
Nov 14, 2025
7105146
Implement a function in contains.js file
Nov 16, 2025
19ca88d
Adding tests in contains.test.js file
Nov 16, 2025
63b7d45
Implementing a function in lookup.js file
Nov 16, 2025
ed3cee8
Adding tests in lookup.test.js file
Nov 16, 2025
1babce8
Fix the implement function in querysrting.js file
Nov 16, 2025
fd422f1
Adding tests in querystring.test.js file
Nov 16, 2025
9279df9
Fix the implement function in tally.js file
Nov 16, 2025
1c6ccc3
Adding tests in tally.test.js file
Nov 16, 2025
8465e56
Answering questions and fix the implemention and adding tests
Nov 16, 2025
81769d1
Adding implementation and test to the file
Nov 24, 2025
d5a5bcd
Answering questions
Nov 24, 2025
f5a92f8
Answering till.js questions
Nov 24, 2025
6d8e6c5
Implementing a alarmclock function
Nov 26, 2025
7221a18
Editing file index.html
Nov 26, 2025
b6b3f4a
Editing file index.html and quotes.js files
Nov 26, 2025
70e0519
Revert "Editing file index.html and quotes.js files"
Fares-Bakhet Dec 1, 2025
5ad1f39
Revert "Editing file index.html"
Fares-Bakhet Dec 1, 2025
413577b
Revert "Implementing a alarmclock function"
Fares-Bakhet Dec 1, 2025
67ecaaa
Revert "Answering till.js questions"
Fares-Bakhet Dec 1, 2025
0939554
Revert "Answering questions"
Fares-Bakhet Dec 1, 2025
0d54919
Revert "Adding implementation and test to the file"
Fares-Bakhet Dec 1, 2025
206b392
Revert "Answering questions and fix the implemention and adding tests"
Fares-Bakhet Dec 1, 2025
75e0482
Revert "Adding tests in tally.test.js file"
Fares-Bakhet Dec 1, 2025
8bb7f6a
Revert "Fix the implement function in tally.js file"
Fares-Bakhet Dec 1, 2025
562022f
Revert "Adding tests in querystring.test.js file"
Fares-Bakhet Dec 1, 2025
62ef964
Revert "Fix the implement function in querysrting.js file"
Fares-Bakhet Dec 1, 2025
5377515
Revert "Adding tests in lookup.test.js file"
Fares-Bakhet Dec 1, 2025
9610268
Revert "Implementing a function in lookup.js file"
Fares-Bakhet Dec 1, 2025
a657abb
Fix quotes generator app
Fares-Bakhet Dec 1, 2025
1dd4be9
Fix HTML file
Fares-Bakhet Dec 2, 2025
c9868e3
Revert "Fix the bug in recipe.js file"
Fares-Bakhet Dec 2, 2025
7f44363
Revert "Fix the bug in author.js file"
Fares-Bakhet Dec 2, 2025
f5893f0
Revert "Fix the bug in address.js file"
Fares-Bakhet Dec 2, 2025
b415c8c
fix HTML file
Fares-Bakhet Dec 2, 2025
aa4c140
Revert "Implement a function in contains.js file"
Fares-Bakhet Dec 3, 2025
2e03c03
Revert "Adding tests in contains.test.js file"
Fares-Bakhet Dec 3, 2025
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
18 changes: 12 additions & 6 deletions Sprint-3/quote-generator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Title here</title>
<script defer src="quotes.js"></script>
<title>Quote Generator App</title>
</head>

<body>
<h1>hello there</h1>
<p id="quote"></p>
<p id="author"></p>
<button type="button" id="new-quote">New quote</button>
<main>
<section>
<h1>Quote Generator App</h1>
<p id="quote"></p>
<p id="author"></p>
<button type="button" id="new-quote">New Quote</button>
</section>
</main>

<script defer src="quotes.js"></script>
</body>
</html>
16 changes: 16 additions & 0 deletions Sprint-3/quote-generator/quotes.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
const quoteElem = document.getElementById("quote");
const authorElem = document.getElementById("author");
const button = document.getElementById("new-quote");

function showNewQuote() {
const random = pickFromArray(quotes);
quoteElem.textContent = random.quote;
authorElem.textContent = random.author;
}

window.addEventListener("DOMContentLoaded", () => {
showNewQuote();

button.addEventListener("click", showNewQuote);
});

// DO NOT EDIT BELOW HERE

// pickFromArray is a function which will return one item, at
Expand Down