Q:
Module quiz: Programming Paradigms
Q:
What will print out when the following code runs? function scopeTest() { var y = 44; console.log(x); } var x = 33; scopeTest();
Q:
What will print out when the following code runs? class Cake { constructor(lyr) { this.layers = lyr; } getLayers() { return this.layers; } } class WeddingCake extends Cake { constructor() { super(2); } getLayers() { return super.getLayers() * 5; } } var result = new WeddingCake(); console.log(result.getLayers());
Q:
What will print out when the following code runs? class Animal { } class Dog extends Animal { constructor() { this.noise = “bark”; } makeNoise() { return this.noise; } } class Wolf extends Dog { constructor() { super(); this.noise = “growl”; } } var result = new Wolf(); console.log(result.makeNoise());
Q:
Consider this code snippet: ‘const [a, b] = [1,2,3,4] ‘. What is the value of b?
Q:
What value will be printed out when the following code runs? function count(…food) { console.log(food.length) } count(“Burgers”, “Fries”, null);
Q:
Which of the following are JavaScript methods for querying the Document Object Model? Select all that apply.
Q:
Which of the following methods convert a JavaScript object to and from a JSON string?
Q:
What will be the result of running this code? const letter = “a”letter = “b”
Q:
What is a constructor?
Subscribe
0 Comments
Oldest
Find Questions in This Page: "CTRL+F"