if I comment the line 1 and uncomment the line 2, this code works. What is the problem with the prompt?
let parte = prompt("What is your name?"); //line 1
//let parte = "Batman"; // line 2
let documents = "bla bla bla";
let $dummy = $("<input>");
$dummy.attr("value", parte+ " " + documents);
$("body").append($dummy);
$dummy.select();
document.execCommand("copy");
$dummy.remove();