Which of the following correctly converts the algorithm below to JavaScript? (Assume that constants for an empty string (ES) and the line break tag (BR) have been declared.)
Display "Enter your full name: "
Input fullName
Display "Enter your age in years: "
Input age
Display "Hi, " + fullName
Display "You are " + age + " years old."
A) fullName = prompt("Enter your full name:",ES) ;
Age = prompt("Enter your age in years:",ES) ;
B) fullName = prompt("Enter your full name:",ES) ;
Age = prompt("Enter your age in years:",ES) ;
Document("Hi, " + fullName + BR) ;
Document("You are " + age + "years old." + BR) ;
C) fullName = prompt("Enter your full name:",ES) ;
Age = prompt("Enter your age in years:",ES) ;
Document.write("Hi, " + fullName + BR) ;
D) fullName = prompt("Enter your full name:",ES) ;
Age = prompt("Enter your age in years:",ES) ;
Document.write("Hi, " + fullName + BR) ;
Document.write("You are " + age + "years old." + BR) ;
Correct Answer:
Verified
Q32: The following statement is an example of
Q33: The following statement is an example of
Q34: The following statement is an example of
Q35: The following statement is an example of
Q36: A common example used for a sequence
Q38: On a flowchart, _ mark the beginning
Q39: On a flowchart, _ are used for
Q40: On a flowchart, _ are used for
Q41: On a flowchart, _ are used for
Q42: On a flowchart, _ are used for
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents