Skip to content

Add generateTip function #10

@heatem

Description

@heatem

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions