第一个解决方案
var name = prompt ("What's your name?");
var result = name.slice(0,1).toUpperCase();
var news = name.substring(1).toLowerCase();
alert("HELLO "+result+news);
第二个解决方案
var name = prompt("What's your name?");
alert("Hello " + name.slice(0,1).toUpperCase() + name.slice(1,name.length).toLowerCase());