What would the following code snippet display?            …

What would the following code snippet display?                var x = 5;                if(x == 4)                document.write(“Math is fun!”);                          else                          document.write(“Wrong! “);                          document.write(“Math is not fun!”);

What is the scope of the variable pencil on line 8?   var…

What is the scope of the variable pencil on line 8?   var pen = “Bic”; var pencil = “0.7 mm lead”; function writeIt() { document.write(“I have a ” + pen + ” pen.”); pen = “Flair”; document.write(“You have a ” + pen + ” pen.”); var pencil = “0.5mm lead”; document.write(“I prefer pencils with ” + pencil); }