-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
25 lines (24 loc) · 1010 Bytes
/
app.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
let tips = [
{
tipText: "Join 757ColorCoded on Slack!",
link: {
url: "https://757colorcoded.slack.com/",
display: "757ColorCoded on Slack",
},
contributor: "Heather"
},
{
tipText: "Join 757ColorCoded on Meetup",
link: {
url: "https://meetup.com/757colorcoded",
},
}
// TODO: Add more tips
]
function generateTip() {
// TODO: Add a constant called randomTip that is a random integer between 0 and the length of the tips array
// TODO: Using randomTip, show the tipText in the paragraph with the tip ID using the random integer
// TODO: Using randomTip, if there is a link url, add it to the paragraph with the link ID. The href should be set to the url. Show the link description if it exists, otherwise show the url
// TODO: Clear the link paragraph if the tip doesn't include link data
// TODO: Using randomTip, show the contributor in the paragraph with the contributor ID
}