GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Ohne Titel

Sam Saiden Englisch 2 Karten

Karten in diesem Stapel (2)

  1. 1Object constructorThere are many ways to create objects in javascript as below
    Object constructor:
    The simplest way to create an empty object is using the Object constructor. Currently this approach is not recommended.
    var object = new Object();
    Object's create method:
    The create method of Object creates a new object by passing the prototype object as a parameter
    var object = Object.create(null);
    Object literal syntax:
    The object literal syntax is equivalent to create method when it passes null as parameter
    var object = {};
    Function constructor:
    Create any function and apply the new operator to create object instances,
    function Person(name){
    var object = {};
    object.name=name;
    object.age=21;
    return object;
    }
    var object = new Person("Sudheer");
    Function constructor with prototype:
    This is similar to function constructor but it uses prototype for their properties and methods,
    function Person(){}
    Person.prototype.name = "Sudheer";
    var object = new Person();
    This is equivalent to an instance created with an object create method with a function prototype and then call that function wi
  2. 2—

Informationen

Beschreibung
Karteikarten am Ohne Titel, erstellt von Sam Saiden am 27/01/2021.
Erstellt von
Sam Saiden
Aufrufe
1
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck