Why do spaces in JavaScript appear to be a new line in HTML?

Viewed 30

As shown in the code, I need to type array elements separated by semicolon then space, but this tends to add semicolon then a new line in the HTML.

      let receiver = document.createElement('td');
      tableRow.append(receiver);
      receiver.innerHTML = `To: ${email.recipients.join('; ')}`;
      receiver.classList.add('receiver');

enter image description here

0 Answers
Related