Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getPostCounts(uint _postID)public view returns(PostCountsModel memory postCounts){
- return postCountOperations[_postID];
- }
- for (let i = 5; i > 0; i--) {
- app.getPostCounts(i).then(_postCounts => {
- console.log('Iteration-->', i);
- console.log('Total Posts Counts', _postCounts);
- })
- 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