Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam CRT-600 Topic 6 Question 84 Discussion

Actual exam question for Salesforce's CRT-600 exam
Question #: 84
Topic #: 6
[All CRT-600 Questions]

Refer to the code below:

const car = {

price:100,

getPrice:function(){

return this.price;

}

};

const customCar = Object.create(car);

customCar.price = 70;

delete customCar.price;const result = customCar.getPrice();

What is the value of result after the code executes?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Margurite
2 months ago
I'm going to go with `null` just because it's the most mysterious and least predictable option. JavaScript, you never cease to surprise me!
upvoted 0 times
...
Rolf
2 months ago
This question is like a game of hide-and-seek with JavaScript objects. I'm going with `undefined` just to keep things interesting.
upvoted 0 times
Skye
1 months ago
I'm going with 70.
upvoted 0 times
...
Rodolfo
1 months ago
I believe it's undefined.
upvoted 0 times
...
Tyisha
1 months ago
I think the value of result is 100.
upvoted 0 times
...
...
Jesse
2 months ago
I think the answer is `70`. Even though we deleted the `price` property from `customCar`, it still has the `price` property set to `70` from earlier.
upvoted 0 times
Delfina
1 months ago
So the getPrice method will return 70.
upvoted 0 times
...
Karma
1 months ago
Because customCar still has the price property set to 70.
upvoted 0 times
...
Chantay
1 months ago
Correct, the value of result is `70`.
upvoted 0 times
...
Tony
2 months ago
I think the answer is `70`.
upvoted 0 times
...
...
Krissy
3 months ago
Wait, didn't we just delete the `price` property from `customCar`? So, shouldn't the result be `undefined`?
upvoted 0 times
...
Heidy
3 months ago
I agree with Rasheeda, the value of result should be undefined.
upvoted 0 times
...
Tu
3 months ago
Hmm, let's see. If we delete the `price` property from `customCar`, it should fall back to the `price` property of the object it's prototypically inheriting from, which is `car`. So, the result should be `100`.
upvoted 0 times
Shawnda
1 months ago
Exactly, the result will be 100.
upvoted 0 times
...
Freida
2 months ago
So, the correct answer is A) 100.
upvoted 0 times
...
Ira
2 months ago
I agree, it should be 100 since customCar falls back to the prototype's price property.
upvoted 0 times
...
Felix
2 months ago
I think the value of result is 100.
upvoted 0 times
...
...
Rasheeda
3 months ago
I believe the value of result is undefined because customCar.price is deleted.
upvoted 0 times
...
Esteban
3 months ago
I think the value of result is 100.
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