Movatterモバイル変換


[0]ホーム

URL:


  1. Glossary
  2. Constructor

Constructor

Aconstructor is a specializedfunction that generatesobjects with the same shape and behavior. The constructor initializes this object with some data specific to the object. The concept of a constructor can be applied to mostobject-oriented programming languages.

InJavaScript, a constructor is usually declared within aclass, but it can also be declared as afunction. In fact, any function that can be called with thenew operator is a constructor.

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp