Quiz
3) JavaScript - Advanced Topics (Checkpoints 18-21)
Este quiz tem tempo limite, por isso abre no player de sempre.
Perguntas do 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`.- AVerdadeiro
- BFalso
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
Informações
- Descrição
- Quiz sobre 3) JavaScript - Advanced Topics (Checkpoints 18-21), criado por Sanny Lin em 24-03-2016.
- Autor
- Sanny Lin
- Idioma
- English
- Visualizações
- 15
- Etiquetas
- Avaliação
- 5,0 de 5 · 1 avaliação Avalie este quiz