Hi Sambit, nice post!
I had a look at the code and here are few thoughts.
createNode
document.createElement()
append
You can use template literals to create all the inner elements and use innerHTML once to put that in the node
innerHTML
const node = document.createElement('div'); node.innerHTML = `<li><span>${title}</span><p>${abstract}</p></li>`
Hope it helps.
Thank you for the insight. It's amazing to see a more efficient way to achieve same result.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Sambit, nice post!
I had a look at the code and here are few thoughts.
createNode
function? It is like renamingdocument.createElement()
method. (same withappend
)You can use template literals to create all the inner elements and use
innerHTML
once to put that in the nodeHope it helps.
Thank you for the insight.
It's amazing to see a more efficient way to achieve same result.