Skip to content

Commit c8ad0d4

Browse files
added proper comments to the script
1 parent 7b9cc17 commit c8ad0d4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Projects/Motivation Mantra/script.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
// Code for loading a new quote everytime the button is clicked
22
function loadQuote()
33
{
44
document.getElementById("copy").innerText = "Copy" ;
@@ -14,13 +14,15 @@ function loadQuote()
1414
});
1515
}
1616

17+
// Code to copy the quote
1718
function copyQuote()
1819
{
1920
copyText = document.getElementById("quoteLine").innerText + " " + document.getElementById("author").innerText;
2021
navigator.clipboard.writeText(copyText);
2122
document.getElementById("copy").innerText = "Copied" ;
2223
}
2324

25+
// Code to enable speech feature
2426
function listen()
2527
{
2628
let utterance = new SpeechSynthesisUtterance(document.getElementById("quoteLine").innerText);

0 commit comments

Comments
 (0)