Which of the following choices shows how Sasha should rewrite the code to make the script execute properly?

Sasha needs to display quotation marks for a greeting on the corporate Web page. She adds the
quotation marks to the JavaScript as follows:
var questions = new Array(2)
questions[0] = “What is the capital of the USA?”;
questions[1] = “Who is the company “President”?”;
questions[2] = “Who is the company “Vice-President”?”;
When Sasha runs the code, however, the quotation marks do not appear around the words
“President” and “Vice-President”

Which of the following choices shows how Sasha should rewrite the code to make the script
execute properly?

Sasha needs to display quotation marks for a greeting on the corporate Web page. She adds the
quotation marks to the JavaScript as follows:
var questions = new Array(2)
questions[0] = “What is the capital of the USA?”;
questions[1] = “Who is the company “President”?”;
questions[2] = “Who is the company “Vice-President”?”;
When Sasha runs the code, however, the quotation marks do not appear around the words
“President” and “Vice-President”

Which of the following choices shows how Sasha should rewrite the code to make the script
execute properly?

A.
questions[1] = “Who is the company “\President” \?”;
questions[2] = “Who is the company “\Vice-President” \?”;

B.
questions[1] = “Who is the company “\President”\?”;
questions[2] = “Who is the company “\Vice-President”\?”;

C.
questions[1] = “Who is the company \ “President” \?”;
questions[2] = “Who is the company \ “Vice-President” \?”;

D.
questions[1] = “Who is the company \”President\”?”;
questions[2] = “Who is the company \”Vice-President\”?”;



Leave a Reply 0

Your email address will not be published. Required fields are marked *