Question: Assume the function getGrade(): function getGrade(score) { if (score >= 90.0) return 'A'; else if (score >= 80.0) return 'B'; else if (score >= 70.0)

Assume the function getGrade():

function getGrade(score) { if (score >= 90.0) return 'A'; else if (score >= 80.0) return 'B'; else if (score >= 70.0) return 'C'; else if (score >= 60.0) return 'D'; else return 'F'; } Provide the output when the next statements are executed: console.log("The grade is "); getGrade(78.5); console.log(" The grade is ");getGrade(59.5); Question options: The grade is 'C' The grade is 'F' The grade is 'B' The grade is 'D' The grade is 'C' The grade is 'F' The grade is 'C'

The grade is 'F' The grade is 'C' The grade is 'F'

_______________________________________________________

Given the following function nPrint(): function nPrint(message, n) { while (n > 0) { console.log(message); n--; } } What is the printout of the call: nPrint('a', 4); Question options: a a a a a a a invalid call a a a a a

_______________________________________________________

What is k after the following block executes? { int k = 2; nPrint("A message", k); } console.log(k); Question options: So, the program has a compile error. 1 0 2 _______________________________________________________

function myFunction1(a, b) { return a * b; } What is the output:

myObject = myFunction1.call(myObject, 10, 2); Question options: 2 10 20 The program does not compile.

______________________________________________________

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!