Copie dois campos para um JavaScript

function generateFullName() {
  document.getElementById("username").innerText =
  document.getElementById("fName").value.toLowerCase() +
  "-" +
  document.getElementById("lName").value.toLowerCase();
}
Outrageous Osprey