Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

define a class in javascript

/* A class is a blue print that you create objects from*/

/* How to create a class in javascript in it's simplest form*/

class Fruit{
}

var apple =new Fruit ();
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #define #class #javascript
ADD COMMENT
Topic
Name
8+7 =