Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Javascript Class expressions

// unnamed
let Rectangle = class {
  constructor(height, width) {
    this.height = height;
    this.width = width;
  }
};
console.log(Rectangle.name);
// output: "Rectangle"

// named
let Rectangle = class Rectangle2 {
  constructor(height, width) {
    this.height = height;
    this.width = width;
  }
};
console.log(Rectangle.name);
// output: "Rectangle2"
Comment

PREVIOUS NEXT
Code Example
Javascript :: should i use map for form fields react 
Javascript :: check trigger is human jquery 
Javascript :: How to create an array containing 1...N 
Javascript :: “javascript sleep 1 second” is a pretty common code problem that people search ;-) 
Javascript :: why typescript is superset of javascript 
Javascript :: javascript activate file input 
Javascript :: javascript blur get new target 
Javascript :: Private slots are new and can be created via Instance and static private fields 
Javascript :: getelementsbyclassname angular 
Javascript :: how to add a key to every html tag in a list react 
Javascript :: typeorm sqlite Using Repositories 
Javascript :: filter state based on text field react 
Javascript :: vercel route all pages to a file 
Javascript :: setinterval clearinterval querySelector until render 
Javascript :: node javascript retry promise.all 
Javascript :: Using the Unshift() Method to Reverse an Array 
Javascript :: Pass Props to a Component Using Short circuit evaluation in react 
Javascript :: react get query params from url 
Javascript :: invert binary tree js 
Javascript :: image support in node js chat app 
Javascript :: react native helper packages 
Javascript :: delayed usestate double click 
Javascript :: why is table.current.row.length not working 
Javascript :: react animated text yarn package 
Javascript :: alpinejs checknox selectAll 
Javascript :: react Fractional rating 
Javascript :: how to swap two variable values in js 
Javascript :: axios 401 unauthorized refresh token multipal request 
Javascript :: jtml cdn enter 
Javascript :: updater function 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =