Language Basics JavaScript DHTML







var inputName = prompt("Please enter your name:");
switch(inputName) {
    case "Tom":
        document.write("Welcome " + inputName);
        break;
    case "Name":
        document.write("Name");
        break;
    default:
        document.write("default:" + inputName);
}