Quiz
3) JavaScript - Advanced Topics (Checkpoints 18-21)
Dieses Quiz hat ein Zeitlimit und öffnet sich deshalb im gewohnten Player.
Fragen in diesem Quiz (6)
1Which of these is an object constructor?
- Afunction Bunny(type) {
this.type = type;
} - Bvar Bunny = {type: ""chocolate""};
- CBunny.create();
- DObject.create(Bunny);
- Afunction Bunny(type) {
2function Star() { // function body };
var andromeda = new Star();
How might you visually depict the prototype chain of `andromeda`?- Aandromeda --> Star.prototype --> Object.prototype --> null
- Bandromeda --> Star --> Function.prototype --> Object.prototype --> null
- Candromeda --> Star.prototype -> Function.prototype --> Object.prototype --> null
- Dandromeda --> Star --> Object.prototype --> null
3var numbers = [4, 84, 9, 7, 33];
numbers.length; // returns 5
numbers.length = 4;
Given the code above, what will `numbers.length` return?- A4
- B5
- Cundefined
- Dnull
4x = ["y", "z"];
console.log(typeof x);
What prints to the console?- A"object"
- B"array"
- Cnull
- Dundefined
5var myString = "This is a string!";
myString.length;
True or false: In this example, `length` is an own property on `myString`.- ARichtig
- BFalsch
6var protoFrog = { // some properties };
var greenFrog = Object.create(protoFrog);
How might you visually depict the prototype chain of `greenFrog`?- AgreenFrog --> protoFrog --> Object.prototype --> null
- BgreenFrog --> protoFrog.prototype --> Object.prototype --> null
- CgreenFrog --> Object.prototype --> null
- Dnone of these
Informationen
- Beschreibung
- Quiz am 3) JavaScript - Advanced Topics (Checkpoints 18-21), erstellt von Sanny Lin am 24/03/2016.
- Autor
- Sanny Lin
- Sprache
- English
- Aufrufe
- 15
- Schlagwörter
- Bewertung
- 5,0 von 5 · 1 Bewertung Bewerte dieses Quiz