Cape Town | 2026-ITP-Jan | Pretty Taruvinga | Sprint 3 | Quote generator#1199
Cape Town | 2026-ITP-Jan | Pretty Taruvinga | Sprint 3 | Quote generator#1199Pretty548 wants to merge 4 commits intoCodeYourFuture:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
4 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
79e6a16 to
9fd61b2
Compare
9fd61b2 to
05d49e0
Compare
cjyuan
left a comment
There was a problem hiding this comment.
- This branch is not clean. It contains a modified file which belongs to the Sprint-1 exercise. Can you revert the change to that file?
Note: On your main branch, you modified Sprint-1/fix/median.js. If you plan to create new branches on this repo, you should revert the change you made on main to prevent the new branches from being polluted.
| ]; | ||
|
|
||
| // call pickFromArray with the quotes array to check you get a random quote | ||
| displayQuote(); |
There was a problem hiding this comment.
We should respect instructions like DO NOT EDIT BELOW HERE; it is usually there for a reason. If you are curious about why, you can ask AI Why should programmers respect "DO NOT EDIT BELOW HERE" instruction in a file?
There was a problem hiding this comment.
Thanks for pointing that out! I’ve removed the change below the “DO NOT EDIT” section and kept my updates within the intended area.
| authorP.innerText = randomQuote.author; | ||
| } | ||
|
|
||
| button.addEventListener("click", displayQuote); |
There was a problem hiding this comment.
Placing all the "run on load" code (lines 11 and 506) inside a function can make it clearer that
"this is what runs when the page loads." For examples,
function setup() {
// code to be executed on page load
}
window.addEventListener('load', setup);or
window.addEventListener('load', function() {
// code to be executed on page load
});
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This reverts commit 53fa90f.
|
Changes to the code look good. Please fix this branch to keep it clean. One way to revert changes to a file is via the First, locate a commit before the file was modified. It could be the first commit you made, assuming the branch started in a clean state. Next, record the first 7 characters of the commit SHA. Suppose the file is After the file is restored, make a commit and push the changes to GitHub. |
f83449a to
c7c41e8
Compare
This comment has been minimized.
This comment has been minimized.
04736f1 to
22b6c5c
Compare
There was a problem hiding this comment.
You managed to make the branch clean now, but in the process you revert also the changes made to quote.js.
Can you reapply the changes you made?
You can see all the changed files here:
https://github.com/CodeYourFuture/Module-Data-Groups/pull/1199/changes
It's a good habit to review all the changes you made on the PR branch (to ensure they are the changes you intended to make).
cjyuan
left a comment
There was a problem hiding this comment.
Change should be easy. I will mark this PR as complete first.
| ]; | ||
|
|
||
| // call pickFromArray with the quotes array to check you get a random quote | ||
| displayQuote(); |
There was a problem hiding this comment.
This version still have this function call beyond the // DO NOT EDIT BELOW HERE marker.
Learners, PR Template
Self checklist
Changelist
Fixed ReferenceError: Cannot access 'quotes' before initialization
Moved displayQuote() call to run after the quotes array is defined
Ensured quotes and author display correctly on page load
Confirmed random quote functionality works on button click