-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
41 lines (33 loc) · 1009 Bytes
/
script.js
File metadata and controls
41 lines (33 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function fetchLeftJoke() {
fetch("https://dummyjson.com/quotes/random")
.then((res) => res.json())
.then((data) => {
const leftJoke = document.getElementById("left");
leftJoke.innerHTML = `
<p id="leftp">${data.quote}</p>`;
})
.catch((error) => {
console.log(error, "left error");
})
}
function fetchRightJoke() {
fetch("https://dummyjson.com/quotes/random")
.then((res) => res.json())
.then((data) => {
const rightJoke = document.getElementById("right");
rightJoke.innerHTML = `
<p id="rightp">${data.quote}</p>`;
})
.catch((error) => {
console.log(error, "right error");
})
}
function wordsDifference() {
const word = document.getElementById("word");
}
function lengthDifference() {
const lenght = document.getElementById("lenght");
}
function match() {
const match = document.getElementById("match");
}