我在 javascript 方面或多或少是新手,我正在尝试制作一些有趣的程序,我希望它询问你的名字,然后告诉你一些事情作为回报。这是代码:
var name = (prompt("What is your name? Capitalization matters!"));
if (name === Random name) {
return("Random name :D, I think you already know who sent you this, but if not it's me :D.");
}
else {
return("Is that really your name? If so, that shows how popular I am haha. If that's not your name, LIAR!");
}