Question: Consider the following JavaScript code and output: function printHello() { } console.log(hello); function printGoodbye() { } console.log(goodbye); let f1 = select(true, printHello, printGoodbye); let

Consider the following JavaScript code and output: function printHello() { } console.log("hello"); function printGoodbye() { } console.log("goodbye"); let f1 = select(true, printHello, printGoodbye); let f2 = select (false, printHello, printGoodbye); f1(); f2(); Output: hello goodbye This code is calling a select function, which isn't shown. Implement select below. As a hint, select returns its second parameter if its first parameter is true, and select returns its third parameter otherwise.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
