GoConqr has a new look! Let us know what you think.

Quiz

This

doolezah 6 questions

Take the quiz

Questions in this 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

Information

Description
Doctorate JavaScript Quiz on This, created by doolezah on 10/07/2015.
Author
doolezah
Language
English
Views
6
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?