Don P: Function.prototype.begetObject

Beitrag lesen

Hallo,

Alles ist eine Instanz von Object. Object ist der oberste Konstruktor aller JavaScript-Objekte (und dessen Prototyp der Prototyp aller Objekte).

Ah ja, danke. Jetzt ist es noch klarer.

Was die Unterscheidung von typeof angeht, so wird zwischen Objekten unterschieden, die die interne Methode [[Call]] kennen oder nicht, und das trifft auf Funktionsobjekte zu. (typeof gibt die internen Typen nicht ohne Nivellierung wieder und ist ist bloß zur Unterscheidung von Primitives und Objects interessant.)

Die Call-Methode macht also den Unterschied, das leuchtet ein.

Gruß, Don P

0 67

Vererbungshierarchie ?!?

Kurt Z
  • javascript
  1. 0
    Struppi
    1. 0
      molily
    2. 0
      Don P
      1. 0
        Kurt Z
        1. 0
          Struppi
          1. 0
            Don P
            1. 0
              Struppi
              1. 0
                Don P
                1. 0
                  Struppi
                  1. 0
                    Don P
                    1. 0
                      Struppi
                      1. 0
                        Don P
                        1. 0
                          Struppi
                          1. 0
                            Don P
                      2. 0
                        Kurt Z
                        1. 0
                          Struppi
                          1. 0
                            Kurt Z
                            1. 0
                              Struppi
                              1. 0
                                Kurt Z
                                1. 0
                                  Struppi
                                  1. 0
                                    Kurt Z
                                    1. 0
                                      LanX²
                                    2. 0
                                      Struppi
                                      1. 0
                                        Kurt Z
                                        1. 0
                                          Kurt Z
                                        2. 0
                                          Struppi
                                          1. 0
                                            Kurt Z
                              2. 0
                                Don P
              2. 0
                LanX²
                1. 0

                  Function.prototype.begetObject

                  LanX²
                  1. 0
                    Don P
                    1. 0

                      Knobelaufgabe

                      LanX²
                      1. 0
                        Don P
                    2. 0
                      molily
                      1. 0
                        Kurt Z
                        1. 0

                          Please beget it!

                          LanX²
                          1. 0
                            Kurt Z
                          2. 0
                            Don P
                            1. 0
                              LanX²
                              1. 0
                                Don P
                              2. 0

                                Iterator

                                KurtZ
                                1. 0
                                  LanX
                      2. 0
                        Don P
        2. 0

          new Object(x) statt object(x)

          Kurt Z
          1. 0
            Murphy
            1. 0
              Kurt Z
              1. 0
                Don P
              2. 0
                Murphy
                1. 0
                  Kurt Z
                2. 0
                  molily
  2. 0
    LanX²
  3. 0
    molily
  4. 3

    __proto__ chain

    LanX²
    1. 0
      LanX²
      1. 0
        Kurt Z
    2. 1
      molily
  5. 0

    JS-Version?

    Kurt Z
    1. 0
      Kurt Z
      1. 0
        molily
        1. 0
          molily
    2. 0
      molily
      1. 0
        Kurt Z
        1. 0
          molily
          1. 0
            Kurt Z
  6. 0

    VIELEN DANK!!!

    Kurt Z
    1. 0
      Struppi