Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Check Object Is Instance Of Class

	class Person
	{
		constructor(firstName, lastName)
		{
			this.firstName = firstName;
			this.lastName = lastName;
			
		}
		
	}
	
	
	function test()
	{
		
		const p = new Person();
		
		console.log(p instanceof Person);
		
	}
 
PREVIOUS NEXT
Tagged: #Check #Object #Is #Instance #Of #Class
ADD COMMENT
Topic
Name
8+1 =