{"version":"1.0","type":"rich","title":"calling-without-new.js","description":"This example shows a JavaScript workaround for calling a constructor function without the `new` keyword. It defines a `Student` constructor that checks `this instanceof Student` and, if false, automatically returns a new instance via `new Student(...)`. The code then invokes `Student('John', 18, 'MIT')` without `new`, demonstrating how the guard ensures proper instantiation. It uses plain JavaScript constructor logic, with a commented-out call to `Person.call` indicating an intended inheritance pattern. The example prints a result via `junior2.getInfoCard()`, though the method itself is not defined in the visible snippet.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-79247604500a8b04e20a?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}