function callBack(data1, predicted_label){
const resultParagraph = document.getElementById("resultParagraph");
resultParagraph.textContent = `Sentiment: ${predicted_label}`;
const historyList = document.getElementById("historyList");
const listItem = document.createElement('li');
listItem.textContent = `Text: ${data1} Sentiment: ${predicted_label}`;
historyList.prepend(listItem); }
In this code i want to add a new line between Text: ${data1} Sentiment: ${predicted_label}
.
I’ve tried adding n, tried adding a
tag but nothing seems to work
New contributor
Abin Raju is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.