Calling the function directly loses the object.
Acceptance criteria
- 1.#out should show Hello Ada.
Calling the function directly loses the object.
const person = { name: "Ada" }; function greet() { return "Hello " + this.name; } const result = greet.call({}); document.querySelector('#out').textContent = result.includes("undefined") ? "undefined" : result;
Output ready when you are
Press Run to render your code, or Submit to validate your solution.