Take the desk from the argument
A function parameter can select a property from an incoming object.
your task
Change only the function parameter. Keep the print line. It must print the desk name in both cases.
runTest passes one object containing desk and clock. The starter prints the whole object where the desk name should appear.
Run code runs your code once for each case. It compares what your code prints with the expected output.
Starter code
or press Ctrl EnterNot run yet
cases
Not run yetThe front desk
Expected output
1
front deskSee the input and the code for this case
function runTest(body) {
body({ desk: "front desk", clock: "09:00" });
}Not run yetThe second floor desk
Expected output
1
second floor deskSee the input and the code for this case
function runTest(body) {
body({ desk: "second floor desk", clock: "14:30" });
}