Returning from inside a timer gives the caller nothing.
Acceptance criteria
- 1.#out should show got Ada.
Returning from inside a timer gives the caller nothing.
function loadUser(callback) { setTimeout(function () { return "Ada"; }, 5); } loadUser(function (name) { document.querySelector('#out').textContent = "got " + (name === undefined ? "nothing" : name); });
Output ready when you are
Press Run to render your code, or Submit to validate your solution.