I am working on a project which displays random articles. I am using JSONPLACEHOLDER for the title and body and RANDOMUSER for creating each article’s author.
All this data is then used to create an array articles
containing several article
objects.
To render these articles in the HTML, displayCards()
is invoked.
The function gets the no of articles previously situated in the DOM and then add 10 more articles using the template element.
The problem is articles.list.slice(n , n + 10)
is returning an empty array but articles.list
contain 100 entries. I am stuck.