Get Programming with JavaScript - Listing 11.03
Listing 11.03 - A tiny quiz
var question = "What is the highest mountain in Wales?";
var answer = "Snowdon";
console.log(question);
Further Adventures
Listing 11.03 - A tiny quiz - Task 3
- Define a showQandA function to display the question and answer.
var question = "What is the highest mountain in Wales?";
var answer = "Snowdon";
var showQandA = function () {
console.log("Q: " + question);
console.log("A: " + answer);
};
showQandA();