Course Solutions Uncategorized (Solved) : 4 Displayed User S Browser Following Code Executes User Enters 87 Prompt Use Strict Var Ge Q27275508 . . . .

(Solved) : 4 Displayed User S Browser Following Code Executes User Enters 87 Prompt Use Strict Var Ge Q27275508 . . . .

 

4.What will be displayed in the user’s browser after thefollowing 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

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

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

Related Post