Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript classes

class SayHelloTo {
  name (to) {
    console.log(`Hello ${to}`);
  }
  constructor (to) {
    this.name(to);
  }
}
const helloWorld = new SayHelloTo(World);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #classes
ADD COMMENT
Topic
Name
5+4 =