<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Joke Time</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin: 50px;
}
</style>
</head>
<body>
<h2>It's Joke Time!</h2>
<button onclick="tellJoke()">Tell me a joke</button>
<p id="joke"></p>
<script>
function tellJoke() {
// Array of jokes for variety
var jokes = [
"Why don't scientists trust atoms? Because atoms are lying BITCHES!",
"Why didnt the scarecrow win an award? Because he was fucking stupid, and a SCARECROW.!",
"What do you call fake spaghetti? Papyrus!",
"How do you organize a space party? You plan ahead like a normal FUCKING PERSON!!",
"Why did the bicycle fall over? Because it was had two tires AND WAS JUST IN THE MIDDLE OF THE FUCKING ROAD!!"
];
// Select a random joke from the array
var randomJoke = jokes[Math.floor(Math.random() * jokes.length)];
// Display the joke in the HTML element with the id "joke"
document.getElementById("joke").innerText = randomJoke;
}
</script>
</body>
</html>
0 comments