WolfGrayy

Untitled

Mar 15th, 2021
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. async function finalAssem(){
  2.   await finish();
  3. ResultArray = [];
  4. function author_data(title, name,linkKarma,commentKarma) {
  5.   this.name = name;
  6.   this.title = title;
  7.   this.linkKarma = linkKarma;
  8.   this.commentKarma = commentKarma;
  9. }
  10.  
  11. function array_element(name, title, linkKarma, commentKarma) {
  12.   this.name = name;
  13.   this.title = title;
  14.   this.linkKarma = linkKarma;
  15.   this.commentKarma = commentKarma;
  16.   //Don't do both of these -- choose which is appropriate
  17.   //Create an empty array
  18.   //this.array_element = new Array();
  19.  
  20.   //or Create an array with one task already defined based on this name and number
  21.   this.array_element = [new array_element(name, title, linkKarma, commentKarma)];
  22. }
  23.  
  24. var j;
  25. for(j = 0;j<uf_authors.length;j++){
  26.   ResultArray[j] = new array_element(uf_authors[j], uf_titles[j],LinkKarmas[j], CommentKarmas[j]);
  27. }
  28.  
  29. addHTML(ResultArray);
  30. console.log(ResultArray);
  31. }
  32. finalAssem();
Advertisement
Add Comment
Please, Sign In to add comment