Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions