0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

vanillaEssences.index

Posted at

 [Angular, React, Vue, ...]といったframework for (JavaScript|TypeScript)がすっかり普及してしまったが,ES6以前は,以下のようなcodeで拵えたObjectを生成していた.
 廃れゆく伝統工芸のような気もするが,糖衣構文の意味が判らなくなってしまうのも癪なので,適宜書き進める.

function Example() {
};

/**
 * https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/new
 */
var app = new Example();

/**
 * inherite
 */
ExampleEx.prototype = new Example();
function ExampleEx() {
};

 performanceに影響があるものの,私は以下の記法を用いてきた.改めるつもりはない.

/**
 * @param {name: ""} lop
 */
function Person(lop) {
  this.name = lop.name;
  this.rx = (function() {
  }).bind(this);
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?