Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam Javascript Developer I Topic 4 Question 85 Discussion

Actual exam question for Salesforce's Javascript Developer I exam
Question #: 85
Topic #: 4
[All Javascript Developer I Questions]

Refer to code below:

function Person() {

this.firstName = 'John';

}

Person.prototype ={

Job: x => 'Developer'

};

const myFather = new Person();

const result=myFather.firstName + ' ' + myFather.job();

What is the value of the result after line 10 executes?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Enola
11 days ago
Wait, why is the 'Job' property declared with an arrow function? That's not going to work the way we expect. I think I'll have to go with option A - 'Error: myFather.job is not a function'.
upvoted 0 times
...
Shelia
18 days ago
Hmm, the problem seems to be that we're trying to access the 'job' property directly instead of using the 'Job' method on the prototype. I'll go with option D - 'John Developer'.
upvoted 0 times
Eun
12 hours ago
I think the correct answer is D) John Developer.
upvoted 0 times
...
...
Gracia
20 days ago
But the code defines the Job property on the Person prototype, so it should be D) John Developer.
upvoted 0 times
...
Patti
21 days ago
I disagree, I believe it's A) Error: myFather.job is not a function.
upvoted 0 times
...
Gracia
26 days ago
I think the value of the result is D) John Developer.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77