Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JS how to access a class propert

function Penguin(name){

   this.name=name;

   this.numLegs=2;

}

var emperor = new Penguin("emperor");

console.log(emperor.name);
console.log(emperor.numLegs);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #JS #access #class #propert
ADD COMMENT
Topic
Name
3+3 =