aiscroll commited on
Commit
2e570f4
·
verified ·
1 Parent(s): d3227a2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -1
README.md CHANGED
@@ -9,4 +9,29 @@ license: mit
9
  short_description: How WouldYouRather.cc Works
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  short_description: How WouldYouRather.cc Works
10
  ---
11
 
12
+ # WouldYouRather.cc
13
+
14
+ A fun site to get random "Would You Rather" questions for games and icebreakers.
15
+
16
+ ## How it works
17
+
18
+ JavaScript randomly picks a question from an array and displays it.
19
+
20
+ ### Demo snippet
21
+
22
+ ```html
23
+ <button onclick="showQuestion()">Show Question</button>
24
+ <div id="question"></div>
25
+
26
+ <script>
27
+ const questions = [
28
+ "Would you rather fly or be invisible?",
29
+ "Would you rather have a pet dragon or a pet unicorn?",
30
+ "Would you rather live in the city or the countryside?"
31
+ ];
32
+
33
+ function showQuestion() {
34
+ const index = Math.floor(Math.random() * questions.length);
35
+ document.getElementById('question').textContent = questions[index];
36
+ }
37
+ </script>