Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. mostVotes = () => {
  2. let mostVotes = 0
  3. this.state.anecdotes.forEach((item) => {
  4. if (item.votes > this.state.anecdotes[mostVotes].votes) {
  5. mostVotes = item
  6. }
  7. })
  8. return mostVotes
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement