私は多かれ少なかれ 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!");
}