-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnew.js
39 lines (36 loc) · 2.44 KB
/
new.js
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
const statements = [
"This is a problem statement. How would you solve this?Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nulla tempora nesciunt culpa tenetur repellat veniam necessitatibus odio, expedita aliquam, neque vero id impedit quibusdam natus delectus obcaecati molestias! Eos, reprehenderit!",
"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nulla tempora nesciunt culpa tenetur repellat veniam necessitatibus odio, expedita aliquam, neque vero id impedit quibusdam natus delectus obcaecati molestias! Eos, reprehenderit!This is a problem statement. How would you solve this?",
"This is a problem statement. How would you solve this? Implement what you have come up with",
"This is a problem statement in the doman of bla bla bla and theme of bla bla bla. How would you solve this?",
"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nulla tempora nesciunt culpa tenetur repellat veniam necessitatibus odio, expedita aliquam, neque vero id impedit quibusdam natus delectus obcaecati molestias! Eos, reprehenderit! This is a problem statement. How would you solve this?",
"In every hackathon you get a problem statement. This is a problem statement. How would you solve this?",
"This is a problem statement. How would you solve this?",
"This is a problem statement. How would you solve this?",
"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nulla tempora nesciunt culpa tenetur repellat veniam necessitatibus odio, expedita aliquam, neque vero id impedit quibusdam natus delectus obcaecati molestias! Eos, reprehenderit!This is a problem statement. How would you solve this?",
"This is a problem statement. How would you solve this?",
"This is a problem statement. How would you solve this?",
"This is a problem statement. How would you solve this?",
];
const container = document.getElementById("container");
window.onload = () => {
statements.forEach((st, i) => {
var div = document.createElement("div");
div.classList.add("statement");
if (i % 2 == 0) {
div.classList.add("blue");
} else {
div.classList.add("red");
}
let index = i + 1;
if (i < 10) {
index = "0" + index;
}
div.innerHTML = `
<span class="index">${i + 1}</span>
<div class="problem">${st}</div>
<span class="big">${index}</span>
`;
container.appendChild(div);
});
};