Javadeus Stardate 93715.9 Destination Variable

JavaScript is a very powerful scripting language. You can enter commands in a free compiler and learn how to code in JavaScript right in the console of Google Chrome browser.

var answer = prompt(‘What is the best programming language’);
if (answer===”JavaScript”) {
alert (“You are correct”)
}
else { alert(“JavaScript is the best language!”); }

Here we are storing a input prompt response in a variable called answer and setting a conditional statement to determine which output statement will be delivered by the program based on the input response.

Leave a Comment