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 2 Question 100 Discussion

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

A developer creates an object where its properties should be immutable and prevent

properties from being added or modified.

Which method should be used to execute this businessrequirement ?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

Ciara
2 days ago
Finally, a question that doesn't involve baking cupcakes or managing a lemonade stand. Object.freeze() is the obvious choice here, folks.
upvoted 0 times
...
Erinn
6 days ago
Hey, Object.lock()? That sounds like something my grandpa would use to keep his diary safe. Let's go with the modern approach, Object.freeze()!
upvoted 0 times
...
Stephaine
9 days ago
I'm not sure about this one. Can someone explain why Object.freeze() is the best choice?
upvoted 0 times
...
Diego
10 days ago
Hmm, Object.const() sounds like it might be the answer, but I don't think that's a real method. Better stick with the tried and true Object.freeze().
upvoted 0 times
...
Helga
10 days ago
I agree with Maxima. Object.freeze() is the correct method to prevent properties from being modified.
upvoted 0 times
...
Maxima
14 days ago
I think the answer is D) Object.freeze(). It makes properties immutable.
upvoted 0 times
...
Tom
14 days ago
Object.freeze() is the way to go! Locks down those properties and keeps them pristine.
upvoted 0 times
...

Save Cancel