Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript use class without instantiating

class API {
   static getUsers() {
     console.log("Fetching users...")
   }
  static version = "1.1";
}

API.getUsers();
console.log( API.version );
 
PREVIOUS NEXT
Tagged: #javascript #class #instantiating
ADD COMMENT
Topic
Name
5+9 =