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 developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #Create #A #Class #Using #JavaScript
ADD COMMENT
Topic
Name
6+7 =