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

Quiz

3) JavaScript - Advanced Topics (Checkpoints 18-21)

Sanny Lin 6 questions 5.0 (1 rating)

Take the quiz

This quiz has a time limit, so it opens in the usual player.

Questions in this quiz (6)

  1. 1Which of these is an object constructor?
    1. Afunction Bunny(type) {
      this.type = type;
      }
    2. Bvar Bunny = {type: ""chocolate""};
    3. CBunny.create();
    4. DObject.create(Bunny);
  2. 2function Star() { // function body };
    var andromeda = new Star();

    How might you visually depict the prototype chain of `andromeda`?
    1. Aandromeda --> Star.prototype --> Object.prototype --> null
    2. Bandromeda --> Star --> Function.prototype --> Object.prototype --> null
    3. Candromeda --> Star.prototype -> Function.prototype --> Object.prototype --> null
    4. Dandromeda --> Star --> Object.prototype --> null
  3. 3var numbers = [4, 84, 9, 7, 33];
    numbers.length; // returns 5
    numbers.length = 4;

    Given the code above, what will `numbers.length` return?
    1. A4
    2. B5
    3. Cundefined
    4. Dnull
  4. 4x = ["y", "z"];
    console.log(typeof x);

    What prints to the console?
    1. A"object"
    2. B"array"
    3. Cnull
    4. Dundefined
  5. 5var myString = "This is a string!";
    myString.length;

    True or false: In this example, `length` is an own property on `myString`.
    1. ATrue
    2. BFalse
  6. 6var protoFrog = { // some properties };
    var greenFrog = Object.create(protoFrog);

    How might you visually depict the prototype chain of `greenFrog`?
    1. AgreenFrog --> protoFrog --> Object.prototype --> null
    2. BgreenFrog --> protoFrog.prototype --> Object.prototype --> null
    3. CgreenFrog --> Object.prototype --> null
    4. Dnone of these

Information

Description
Quiz on 3) JavaScript - Advanced Topics (Checkpoints 18-21), created by Sanny Lin on 24/03/2016.
Author
Sanny Lin
Language
English
Views
15
Tags
100
Rating
5.0 out of 5 · 1 rating
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?