-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript.js
More file actions
24 lines (24 loc) · 744 Bytes
/
Copy pathscript.js
File metadata and controls
24 lines (24 loc) · 744 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
const topics = ['HTML', 'CSS', 'Git', 'Javascript'];
const randomTopic = topics[Math.floor(Math.random() * topics.length)];
function listTopics() {
for(let x = 0; x < topics.length; x++){
console.log(topics[x]);
}
}
function selectTopic() {
if (randomTopic === 'HTML'){
console.log("Let's study HTML!");
} else if (randomTopic === 'CSS') {
console.log("Let's study CSS!");
} else if (randomTopic === 'Git'){
console.log("Let's Study Git!");
} else if (randomTopic === 'JavaScript'){
console.log("Let's study JavaScript!");
} else {
console.log('Please try again!');
}
}
console.log('Here are the topics we learned through Prework:');
listTopics()
console.log('Which topic should we study first?');
selectTopic()