I'm making a prompt that's supposed to capitalize user input and print it into the HTML. But it won't capitalize the input, what am I doing wrong?
var name = prompt("What's your name?");
var fullname = name;
function capitalize() {
fullname.style.textTransform = "capitalize";
}
document.write(fullname);