What is the scope of the variable pen on line 1?   var pen…

What is the scope of the variable pen on line 1?   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); }     

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); }