Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Create A Class Using JavaScript


	 class Person
	 {
	 	
		constructor(name)
		 {
			 this.name = name;
			 console.log("HELLO WORLD")
             /*console.log will show HELLO WORLD everytime an instance of Person is created*/
		 }
	 }
Source by javascript.info #
 
PREVIOUS NEXT
Tagged: #Create #A #Class #Using #JavaScript
ADD COMMENT
Topic
Name
2+5 =