JavaScript's this, Decorators, and the Call Stack Quiz
Interactive Quiz ⋅ 11 Questions
By Stephen Gruppetta
In this quiz, you’ll test your understanding of JavaScript’s this, Decorators, and the Call Stack for Pythonistas.
By working through this quiz, you’ll revisit how a call chooses this, when
.call() runs a function now and .bind() saves it for later, why an arrow keeps
the this it was made with, how a wrapper hands on its receiver and result, how a
run-once wrapper and a cache remember results correctly, what’s safe to cache, how
names resolve where a function was written, why a const can’t be read before its
line, and when recursion is the right tool.
Most questions show a short JavaScript snippet, often next to the Python you’d write, and ask what it does in JavaScript or how to complete it. Good luck!
The quiz contains 11 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!
Related Resources
Course
JavaScript's this, Decorators, and the Call Stack for Pythonistas
Port a translation desk's quote pipeline to JavaScript, and learn to keep a method's this, apply decorators as explicit wrappers, build cache keys that work, and trace the call stack.