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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started