null
US
Sign In
Sign Up for Free
Sign Up
We have detected that Javascript is not enabled in your browser. The dynamic nature of our site means that Javascript must be enabled to function properly. Please read our
terms and conditions
for more information.
Next up
Copy and Edit
You need to log in to complete this action!
Register for Free
4944503
3) JavaScript - Advanced Topics (Checkpoints 18-21)
Description
Quiz on 3) JavaScript - Advanced Topics (Checkpoints 18-21), created by Sanny Lin on 03/24/2016.
No tags specified
100
Quiz by
Sanny Lin
, updated more than 1 year ago
More
Less
Created by
Sanny Lin
about 10 years ago
12
0
0
Resource summary
Question 1
Question
Which of these is an object constructor?
Answer
function Bunny(type) { this.type = type; }
var Bunny = {type: ""chocolate""};
Bunny.create();
Object.create(Bunny);
Question 2
Question
function Star() { // function body }; var andromeda = new Star(); How might you visually depict the prototype chain of `andromeda`?
Answer
andromeda --> Star.prototype --> Object.prototype --> null
andromeda --> Star --> Function.prototype --> Object.prototype --> null
andromeda --> Star.prototype -> Function.prototype --> Object.prototype --> null
andromeda --> Star --> Object.prototype --> null
Question 3
Question
var numbers = [4, 84, 9, 7, 33]; numbers.length; // returns 5 numbers.length = 4; Given the code above, what will `numbers.length` return?
Answer
4
5
undefined
null
Question 4
Question
x = ["y", "z"]; console.log(typeof x); What prints to the console?
Answer
"object"
"array"
null
undefined
Question 5
Question
var myString = "This is a string!"; myString.length; True or false: In this example, `length` is an own property on `myString`.
Answer
True
False
Question 6
Question
var protoFrog = { // some properties }; var greenFrog = Object.create(protoFrog); How might you visually depict the prototype chain of `greenFrog`?
Answer
greenFrog --> protoFrog --> Object.prototype --> null
greenFrog --> protoFrog.prototype --> Object.prototype --> null
greenFrog --> Object.prototype --> null
none of these
Show full summary
Hide full summary
Want to create your own
Quizzes
for
free
with GoConqr?
Learn more
.
Similar
Browse Library