Question 81
A developer wants to use a module called DatePrettyPrint.
This module exports one default function called printDate().
How can the developer import and use printDate()?
Question 82
Original constructor function:
01 function Vehicle(name, price) {
02 this.name = name;
03 this.price = price;
04 }
05 Vehicle.prototype.priceInfo = function () {
06 return `Cost of the $(this.name) is $(this.price)$`;
07 }
08 var ford = new Vehicle('Ford Fiesta', '20,000');
Which class definition is correct?
Question 83
Why does second have access to variable a?
Question 84
Which statement can a developer apply to increment the browser's navigation history without a page refresh?
Which statement can a developer apply to increment the browser's navigation history without a page refresh?
Question 85
Given the code below:
01 function Person() {
02 this.firstName = 'John';
03 }
04
05 Person.proto = {
06 job: x => 'Developer'
07 });
08
09 const myFather = new Person();
10 const result = myFather.firstName + ' ' + myFather.job();
What is the value of result when line 10 executes?
