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

Quiz

This

doolezah 6 Fragen

Quiz starten

Fragen in diesem Quiz (6)

  1. 1What ways can "this" take a value?
    1. AIn normal function calls
    2. BWithin methods on objects
    3. CWithin an object that has been constructed
    4. DA function invoked with .call, .apply, or bind
  2. 2What does "this" refer to below?

    function helloWorld() {
    console.log("Hello world!");
    console.log(this);
    };

    helloWorld();
    1. AThe window object in the global context of a normal function.
    2. BThe string "Hello world"
    3. Cconsole.log
    4. DThe function name "helloWorld()".
  3. 3What type of function is the one shown below?:

    var City = function(name, state) [
    this.name = name || 'Portland';
    this.state = state || 'Oregon';
    };
    1. AConstructor Function
    2. BGlobal Function
    3. CLocal Function
    4. DMal Function
  4. 4When a constructor function is used to create a new object, what does "this" refer to?
    1. AThe object that is created.
    2. BThe constructor function.
    3. CThe global function.
    4. DThe local function.
  5. 5What does "this" ALWAYS refer to and holds the value of?
    1. AAn object
    2. BA variable
    3. CA function
    4. DA procedure
  6. 6When used in a global function in a browser with strict mode, what does "this" refer to?
    1. AThe global window object
    2. BBoth the global window object and its value
    3. CThe function
    4. DGlobal variables

Informationen

Beschreibung
Doctorate JavaScript Quiz am This, erstellt von doolezah am 10/07/2015.
Sprache
English
Aufrufe
6
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck