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 Javascript Developer I Topic 7 Question 13 Discussion

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

Refer to the code below:

Let foodMenu1 = ['pizza', 'burger', 'French fries'];

Let finalMenu = foodMenu1;

finalMenu.push('Garlic bread');

What is the value of foodMenu1 after the code executes?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Garima Agrawal
6 months ago
Answer would be A, as If you assign this object variable to another variable, it does not copy the object. Instead, it copies the reference to the object. Both variables now point to the same memory space, which means changes through one variable are reflected when accessing the object through the other variable.
upvoted 1 times
...

Save Cancel