这是一个为我的世界服务器论坛判断版主应用程序的程序。我想知道为什么除了默认值之外什么都没有输出。请帮帮我。
代码就在这里:
var moderatorApplicant=new Object();
moderatorApplicant.active=true; //boolean;
moderatorApplicant.age=15; //number;
moderatorApplicant.applicationLength="long"; //string, "short" or "long";
console.log("Moderator Application Judge Result:");
switch(moderatorApplicant)
{
case (moderatorApplicant.active===true&&moderatorApplicant.age>=14&&moderatorApplicant.applicationLength=="long"):
console.log("You are fit for a mod! +1");
break;
case (moderatorApplicant.active===true&&moderatorApplicant.age<14&&moderatorApplicant.applicationLength=="long"):
console.log("You're active! You're app is long! You aren't 14 or over though, so +0.");
break;
case (moderatorApplicant.active===true&&moderatorApplicant.age>=14&&moderatorApplicant.applicationLength=="short"):
console.log("App is short, but you're active, and you meet age requirements. +0");
break;
case (moderatorApplicant.active===true&&moderatorApplicant.age<14&&moderatorApplicant.applicationLength=="short"):
console.log("You're active, your app is short, and you are younger than 14. -1");
break;
case (moderatorApplicant.active===false&&moderatorApplicant.age>=14&&moderatorApplicant.applicationLength=="long"):
console.log("You are not active, but you are over 14 and have a long app. Try again when you are more active +0");
break;
case (moderatorApplicant.active===false&&moderatorApplicant.age<14&&moderatorApplicant.applicationLength=="long"):
console.log("You're young, you aren't active, but your app is long. -1");
break;
case (moderatorApplicant.active===false&&moderatorApplicant.age>=14&&moderatorApplicant.applicationLength=="short"):
console.log("You are not active. You made a short app, but you are over 14. -1");
break;
case (moderatorApplicant.active===false&&moderatorApplicant.age<14&&moderatorApplicant.applicationLength=="short"):
console.log("This is the definition of a bad application. Not active, younger than 14, and short app. -1.");
break;
default:
console.log("Check again. Inappropriate values.");
break;
}