What symbol or set of symbols indicates that you are calling a method?
()
How do you specify a block of code to be executed, if a specified condition is true?
a. if true then { ... }
b. if (true) { ... }
c. if { true }
d. if (true) ;
b. if (true) { ... }
"Overriding" a method in Javascript means:
a. Adding to the parent's method in the child class
b. Replacing the parent's method with the child's method
c. Superseding the child's method with the parent's method
b
How do you add comments in JavaScript? (block and line)
// for line
/* */ for block
How do you create an anonymous instance of class Frog?
new Frog();
How do you declare a static variable called kissed for the Frog class?
Frog.kissed;
How do you create an instance of a class?
a. let myObject = new ObjectClass();
b. create myObject from ObjectClass();
c. let myObject = new ObjectClass {}
d. myObject extends Object Class {}
b. let myObject = new ObjectClass();
"Is equal to" in a conditional statement
== or ===
Write a for loop that does something 3 times.
for (i = 1; i <=3; i++) { // do stuff }
How do you create a class which is a child of another class?
class myClass extends ParentClass {}
What is the term for assigning a value to a variable when it is created?
initializing
How do you "override" a parent's method called croak() in the child class?
croak() { // new method }
How do you tell the constructor of a child class to use the constructor of the parent class?
super();
Which of these statements passes an argument to the constructor of class Frog?
a. new Frog(argument);
b. constructor(Frog) { }
c. let argument = Frog(constructor);
d. let constructor = new Frog();
a. new Frog(argument);
How do you "add to" a method called croak() from the parent class?
croak(){
super.croak();
// add stuff
}