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 86 Discussion

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

A developer at Universal Containers is creating their new landing pagebased on HTML, CSS, and JavaScript. The website includes multiple external resources that are loaded when the page is opened.

To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage isloaded and there is no need to wait for the resources to be available.

Which statement should be used to call personalizeWebsiteContent based on the above business requirement?

Show Suggested Answer Hide Answer
Suggested Answer: B, D

Contribute your Thoughts:

Yolande
5 days ago
But wouldn't using 'load' ensure that the script is executed when all resources are loaded, providing a better user experience?
upvoted 0 times
...
Junita
6 days ago
I disagree, I believe the correct answer is B) windows,addEventListener('DOMContent Loaded ', personalizeWebsiteContent);
upvoted 0 times
...
Yolande
8 days ago
I think the answer is A) windows,addEventListener('load', personalizeWebsiteContent);
upvoted 0 times
...

Save Cancel