Javascript simple prompt

14.21 Muhamad Akbar Bin Widayat 0 Comments

var name;
// Prompt for the user's name here.
prompt("what's your name?");

if(name === "Sam") {

  console.log("Your name is Sam!");

} else{

  console.log("Your name isn't Sam!");

}

0 komentar:

terimakasih komentarnya