New Year Sale ! 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 3 Question 65 Discussion

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

Which code change should be done for the console to log the following when 'Click me!' is clicked'

> Row log

> Table log

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Haley
6 months ago
Option C for the win! Unless, of course, you're feeling particularly adventurous and want to try breaking the entire app. *chuckles*
upvoted 0 times
Huey
5 months ago
Yeah, I agree. Let's go with that.
upvoted 0 times
...
Lashaunda
5 months ago
Option C sounds like the way to go.
upvoted 0 times
...
...
Antione
6 months ago
This is a classic DOM event handling problem. I bet the correct answer is hidden in plain sight. *winks*
upvoted 0 times
Lashon
5 months ago
C) Change line 14 to elem.addEventListener ('click', printMessage, true);
upvoted 0 times
...
Demetra
5 months ago
B) Change line 10 to event.stopPropagation (false) ;
upvoted 0 times
...
Tegan
5 months ago
A) Remove lines 13 and 14
upvoted 0 times
...
...
Ronny
6 months ago
I don't think removing lines 13 and 14 is necessary, C) seems like the correct option
upvoted 0 times
...
Silvana
6 months ago
But what about removing lines 13 and 14? Wouldn't that also work?
upvoted 0 times
...
Venita
6 months ago
Hmm, I'd have to test it to be sure, but C seems like the most logical choice. Can't wait to get my hands on this code!
upvoted 0 times
...
Skye
6 months ago
I agree, changing line 14 to addEventListener should log the message
upvoted 0 times
...
Ronny
6 months ago
I think the answer should be C)
upvoted 0 times
...
Misty
6 months ago
I think we should consider removing line 10 instead. That might be causing the logging issue.
upvoted 0 times
...
Corrinne
7 months ago
I'm not sure, but I think D might be the answer. Stopping the propagation seems like overkill for this simple use case.
upvoted 0 times
Walton
6 months ago
Changing line 14 to addEventListener might also work.
upvoted 0 times
...
Von
6 months ago
I agree, removing line 10 seems like the best option.
upvoted 0 times
...
Francoise
6 months ago
I agree, let's go with D then.
upvoted 0 times
...
Barbra
6 months ago
I think D might be the answer. Stopping the propagation seems like overkill for this simple use case.
upvoted 0 times
...
Benton
6 months ago
I agree, removing line 10 should do the trick.
upvoted 0 times
...
Remedios
6 months ago
I think D is the answer too. It seems like the most straightforward solution.
upvoted 0 times
...
Kanisha
6 months ago
I think D is the answer. It seems like stopping the propagation is not necessary.
upvoted 0 times
...
...
Octavio
7 months ago
But the problem might be with line 14. Changing it to elem.addEventListener ('click', printMessage, true) could solve the issue.
upvoted 0 times
...
Vallie
7 months ago
Option C looks like the winner to me. Capturing the event during the bubbling phase is the way to go.
upvoted 0 times
Angella
6 months ago
Sounds good to me. Option C it is.
upvoted 0 times
...
Jutta
6 months ago
Great, let's go with option C then.
upvoted 0 times
...
Yun
6 months ago
That's correct. It will log the message when 'Click me!' is clicked.
upvoted 0 times
...
Lawrence
6 months ago
So, we should change line 14 to elem.addEventListener('click', printMessage, true);
upvoted 0 times
...
Aimee
6 months ago
I agree, capturing the event during the bubbling phase seems like the right approach.
upvoted 0 times
...
Elouise
6 months ago
I agree, capturing the event during the bubbling phase makes sense.
upvoted 0 times
...
Julianna
7 months ago
I think option C is the best choice.
upvoted 0 times
...
Veronika
7 months ago
I think option C is the best choice.
upvoted 0 times
...
...
Lorrine
7 months ago
I disagree. I believe changing line 10 to event.stopPropagation (false) is the correct change.
upvoted 0 times
...
Octavio
7 months ago
I think we should remove lines 13 and 14.
upvoted 0 times
...

Save Cancel