here is my JS Code
<------------------------------------------------->
$(document).ready(function(){
function getQuote()
{
var quotes=["shani","baba","Me","I'm"];
var authors=["A1","A2","A3"];
var randomNum=math.floor((math.random()*quotes.length));
var randomQuote=quotes[randomNum];
var randomAuthor=authors[randomNum];
$(".quote").text(randomQuote);
$(".author").text(randomAuthor);
}
$(".mybutton").on("click",function(){
getQuote();
});
});
<------------------------------------------------>
Here is my HTML
<------------------------------------------------->
I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.