{"version":"1.0","type":"rich","title":"this, that and module pattern","description":"This example illustrates JavaScript’s `this` binding rules across different invocation patterns, using plain console output rather than a visual dataset. It demonstrates how `this` behaves in object methods, immediately invoked function expressions, and module patterns, with the `module.js` file showing a revealed-module approach where a helper function loses its object context. The code relies solely on native JavaScript and the console API, with no external libraries or rendering. The key contrast is between caching `this` into `that` (as in `init.js`) versus relying on implicit binding, which yields either the object or the `DOMWindow` depending on the call site.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-1126479?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}