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 <br>
tag but nothing seems to work