-
-
Notifications
You must be signed in to change notification settings - Fork 149
Sheffield|May-2025|Sheida Shabankari|Module-Data -Groups| Sprint-3|Quote generator #638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code is good.
If you are interested in improving the readability of your code, you could check out the CYF's style guide: a https://curriculum.codeyourfuture.io/guides/reviewing/style-guide/
Sprint-3/quote-generator/quotes.js
Outdated
document.getElementById("auto-play").addEventListener("change",(event)=>{ | ||
if (event.target.checked){ | ||
//console.log("auto-play is on"); | ||
document.getElementById("auto-play-label").textContent = "auto-play : ON"; | ||
intervalId=setInterval(pickAndDisplayQuote,5000); | ||
}else{ | ||
document.getElementById("auto-play-label").textContent = "auto-play : OFF"; | ||
clearInterval(intervalId); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably insert some space around operators and punctuations in the code at lines 506-511 to improve their readability (like what you did in lines 495-500).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I did it .
First ,I have showed qoute and author on screen by clicking the button ,next add a chekbox and if it is checked display the text automatically every 5 second and stop with uncheck ed the checkbox.
Also , I have runned the test cases and all of them passed.