Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mostVotes = () => {
- let mostVotes = 0
- this.state.anecdotes.forEach((item) => {
- if (item.votes > this.state.anecdotes[mostVotes].votes) {
- mostVotes = item
- }
- })
- return mostVotes
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement