Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
JavaScript
/
JavaScript
A method is passed directly as a callback and loses its receiver. Which narrow change pre…
from JavaScript
advanced
1 min
A method is passed directly as a callback and loses its receiver. Which narrow change preserves the original receiver without changing the method body?
Pass `controller.handle.bind(controller)`.
Pass `controller.handle.call(controller)` as the callback.
Assign `controller.handle` to a new variable and pass that variable.
Check
Ask AI about this kata
Report an error
previous kata
Name the mechanism by which a function retains access to variables from its defining scop…
Fill in
next kata
When reading `object.label`, where does JavaScript look first?
Quiz
A new version is available
Reload