MCPcopy
hub / github.com/zachgoll/fullstack-roadmap-series / showMeme

Function showMeme

code-challenges/lesson-7/solution/script.js:13–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13function showMeme() {
14 // Value should be a string representing image URL
15 const randomMemeUrl = getRandomData("memes");
16
17 const memeContainer = document.querySelector(".meme-content");
18 const newMeme = document.createElement("img");
19 newMeme.setAttribute("src", randomMemeUrl);
20
21 clearAll();
22
23 // Add the new img to the document
24 memeContainer.appendChild(newMeme);
25}
26
27function showJoke() {
28 // Value should be a string representing the joke

Callers

nothing calls this directly

Calls 2

getRandomDataFunction · 0.70
clearAllFunction · 0.70

Tested by

no test coverage detected