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

var question = "What is the highest mountain in Wales?"; var answer = "Snowdon"; var showQandA = function () { console.log("Q: " + question); console.log("A: " + answer); }; showQandA();