Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generateTip function #10

Open
6 tasks
heatem opened this issue Oct 13, 2020 · 0 comments
Open
6 tasks

Add generateTip function #10

heatem opened this issue Oct 13, 2020 · 0 comments

Comments

@heatem
Copy link
Contributor

heatem commented Oct 13, 2020

In the generateTip function in the app.js file:

  • Add a constant named randomTip that is a random integer between 0 and
  • the length of the tips array
  • Using randomTip, show the tipText in the paragraph with the tip ID
  • 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. Clear the link paragraph if the tip doesn't include link data.
  • Using randomTip, show the contributor in the paragraph with the contributor ID
  • Delete the related TODOs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant