Question: 4.What will be displayed in the user's browser after the following code executes if the user enters 87 at the prompt? use strict var getInfo

4.What will be displayed in the user's browser after the following code executes if the user enters 87 at the prompt?

"use strict"

var getInfo = function() {

grade = parseInt(prompt("What's your score on the test?"));

var newGrade = getResult(grade);

alert("Your grade, curved, is " + newGrade);

};

var getResult = function(grade) {

var newGrade = grade + 5;

return (newGrade);

};

a.an alert will display: Your grade, curved, is 92

b.an alert will display: Your grade, curved, is NaN

c.nothing will display; grade is an undeclared variable

d.nothing will display; newGrade cannot be declared twice

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!