Valid JS-Dev-101 Dumps shared by EduDump.com for Helping Passing JS-Dev-101 Exam! EduDump.com now offer the newest JS-Dev-101 exam dumps, the EduDump.com JS-Dev-101 exam questions have been updated and answers have been corrected get the newest EduDump.com JS-Dev-101 dumps with Test Engine here:
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?
Correct Answer: A
Person.proto is being set, but JavaScript uses Person.prototype for the prototype chain, not Person.proto. Therefore, job is not on Person.prototype, and instances of Person do not have job via prototype. myFather is created with new Person(), so: myFather.firstName is 'John'. myFather.job is undefined. Attempting to call myFather.job() results in: TypeError: myFather.job is not a function So option A is correct. ________________________________________