Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. function getPostCounts(uint _postID)public view returns(PostCountsModel memory postCounts){
  2. return postCountOperations[_postID];
  3. }
  4.  
  5. for (let i = 5; i > 0; i--) {
  6. app.getPostCounts(i).then(_postCounts => {
  7. console.log('Iteration-->', i);
  8. console.log('Total Posts Counts', _postCounts);
  9.  
  10. })
  11.  
  12. Iteration--> 5 Total Posts Counts (5) ["0", "0", "0", "0", Array(0), postID: "0", likes: "0", disLikes: "0", shares: "0", comments: Array(0)] Iteration--> 4 Total Posts Counts (5) ["0", "0", "0", "0", Array(0), postID: "0", likes: "0", disLikes: "0", shares: "0", comments: Array(0)] Iteration--> 3 Total Posts Counts (5) ["0", "0", "0", "0", Array(0), postID: "0", likes: "0", disLikes: "0", shares: "0", comments: Array(0)] Iteration--> 2 Total Posts Counts (5) ["0", "0", "0", "0", Array(0), postID: "0", likes: "0", disLikes: "0", shares: "0", comments: Array(0)] Iteration--> 1 Total Posts Counts (5) ["0", "0", "0", "0", Array(0), postID: "0", likes: "0", disLikes: "0", shares: "0", comments: Array(0)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement