diff options
author | Florian Dieminger <me@fiji-flo.de> | 2021-02-11 18:20:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 18:20:22 +0100 |
commit | 999e51572c093be901d6c8f942feb76038ae940c (patch) | |
tree | 0b2242d6df50748abf3f11c717211e8bbcf3d45e /files/de/glossary/constructor/index.html | |
parent | 747e709ad97c5782af29688f52c8105c08d9a323 (diff) | |
parent | 12b585b8e60a2877ff64dc6dc5ab058c43652f47 (diff) | |
download | translated-content-999e51572c093be901d6c8f942feb76038ae940c.tar.gz translated-content-999e51572c093be901d6c8f942feb76038ae940c.tar.bz2 translated-content-999e51572c093be901d6c8f942feb76038ae940c.zip |
Merge pull request #55 from fiji-flo/unslugging-de
Unslugging de
Diffstat (limited to 'files/de/glossary/constructor/index.html')
-rw-r--r-- | files/de/glossary/constructor/index.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/files/de/glossary/constructor/index.html b/files/de/glossary/constructor/index.html new file mode 100644 index 0000000000..0d3fdb5482 --- /dev/null +++ b/files/de/glossary/constructor/index.html @@ -0,0 +1,48 @@ +--- +title: Konstruktor +slug: Glossary/Constructor +translation_of: Glossary/Constructor +original_slug: Glossary/Konstruktor +--- +<p>Ein <strong>Konstruktor</strong> gehört zu einer Instanz eines bestimmten Klassen-{{glossary("object","Objekts")}}.</p> + +<p>Der Konstrutktor instanziiert dieses Objekt und bietet Zugriff auf seine privaten Informationen. Das Konzept des Konstruktors findet in den meisten {{glossary("OOP","Objekt-orientierten Programmiersprachen")}} Anwendung. Im Allgemeinen wird ein Konstruktor in {{glossary("JavaScript")}} in der Instanz einer {{glossary("class","Klasse")}} deklariert.</p> + +<h2 id="Syntax">Syntax</h2> + +<pre class="brush: js">// This is a generic default constructor class Default +function Default() { +} + +// This is an overloaded constructor class Overloaded +// with parameter arguments +function Overloaded(arg1, arg2, ...,argN){ +} +</pre> + +<p>Um einen Konstruktor aufzurufen, verwenden Sie den <code>new</code> operator, welcher einer {{glossary("variable","Variable")}} eine neue {{glossary("object reference","Objekt-Referenz")}} zuweist.</p> + +<pre class="brush: js">function Default() { +} + +// A new reference of a Default object assigned to a +// local variable defaultReference +var defaultReference = new Default(); +</pre> + +<p> </p> + +<h2 id="Siehe_auch">Siehe auch</h2> + +<h3 id="Generelles_Wissen">Generelles Wissen</h3> + +<ul> + <li>{{Interwiki("wikipedia", "Constructor_%28object-oriented_programming%29", "Konstruktor")}} auf Wikipedia</li> +</ul> + +<h3 id="Technische_Referenz">Technische Referenz</h3> + +<ul> + <li><a href="/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript#The_Constructor">The constructor in object oriented programming for JavaScript</a> on MDN</li> + <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/new">New operator in JavaScript</a> on MDN</li> +</ul> |