JavaScriptとgrid
JavaScript Class Javascript Class Method JavaScript Classes A class is a type of function, use the keyword of class. When the class to be created, always need a constructor() method. ↑ onload="showResize()" を加えてresize していなくてもwindow size が表示されるように。reloadだと消える。 Jump screen end class Car { constructor(name) { this.carname = name; // this を使わないとobjectを呼び出せない(?から?) } present(y) { return y + ", We have a " + this.carname; } } thecar = new Car("Saab"); document.getElementById("CMethod").innerHTML = thecar.present("Yes"); time now Date reference JavaScript Class Inheritance Use the "extends" keyword to inherit all methods from another class. Use the "super" method to call the parent's constructor function. //extends and super() class Car1 { constructor(brand) { this.carname1 = brand; } presntt1() { return 'We have a ' + this.carname1; } } cl