“prompt()” Code-Antworten

prompt()

var sign = prompt("Jaki jest twój znak zodiaku?");
if (sign.toLowerCase() == "skorpion")
   alert("Wow! Też jestem Skorpionem!");
Mateusz Przybylski

auffordern js

//Type your message in the prompt window and this code will count how many characters you have typed and how many characters left if limit is 180 characters. 
var message = prompt("Please enter your message.");
var messageLength = message.length;
var charactersLeft = 180 - messageLength;
alert ("You have written " + messageLength + "characters" + ", you have left " + charactersLeft + "characters");
Oleksandr Shevchuk

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen