var gfg = objectName instanceof objectType
objectName: States the name of Object.
Example-2: Demonstrating that String and Date objects are also a type of Object (derived from Object).
- Google Chrome
- Apple Safari
- What is the difference between is_a() function and instanceof in PHP?
- Why overriding both the global new operator and the class-specific operator is not ambiguous?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.