You are supposed to ask for 3 names with prompt, use an array to store and then display their values.
function names() {
var nombres = [];
var cont;
for (int i = 0; i <= 2; i++) {
var x = prompt("Ingresa tu nombre:", "");
nombre[i] = x;
}
for (int i = 0; i <= 2; i++) {
cont += nombres[i] + " ";
}
document.getElementById("here").innerHTML = cont;
}