New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) Exam - Topic 1 Question 97 Discussion

Actual exam question for Salesforce's Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) exam
Question #: 97
Topic #: 1
[All Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) Questions]

A developer is asked to write a log containing the ID and name of the product with a variable named myProduct.

Which snippet of code should be used?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Avery
3 days ago
Wait, is "producto" a typo? Shouldn't it be "product"?
upvoted 0 times
...
Yolande
8 days ago
I think C is the best choice, it’s cleaner with template literals.
upvoted 0 times
...
Glenna
13 days ago
Option A looks solid, using the right method for logging.
upvoted 0 times
...
Linwood
18 days ago
C) for the win! Who needs all that extra syntax when you can just use string interpolation?
upvoted 0 times
...
Mozelle
24 days ago
C) is the clear winner here. Simple and effective.
upvoted 0 times
...
Bettina
29 days ago
I'd go with C) to keep the code clean and readable.
upvoted 0 times
...
Dion
1 month ago
C) looks the most straightforward.
upvoted 0 times
...
Wei
1 month ago
I thought we were supposed to use placeholders like `%s` in logging, so option D seems plausible, but I can't remember if the parentheses are correct there.
upvoted 0 times
...
Belen
1 month ago
I'm a bit confused about the use of `context()` in options B and D. I don't recall seeing that in our examples.
upvoted 0 times
...
Regenia
2 months ago
I think option A looks familiar, but I'm not sure if the syntax is exactly right for the logger function.
upvoted 0 times
...
Alba
2 months ago
This seems simple enough, but I want to make sure I'm not missing any subtle details. I'll carefully consider each option before making my choice.
upvoted 0 times
...
Aleisha
2 months ago
I'm a little unsure about the correct way to use the logger here. I'll need to review the documentation to make sure I understand the different formatting options.
upvoted 0 times
...
Georgiana
2 months ago
I prefer option C. It looks cleaner with template literals.
upvoted 0 times
...
Stephane
2 months ago
I think option A is the best. It uses the correct syntax.
upvoted 0 times
...
Elmer
3 months ago
Ah, I've seen this type of question before. I'm pretty confident I can figure this out. Time to put my coding skills to the test!
upvoted 0 times
...
Tracey
3 months ago
C) is the way to go. No need to get fancy with string formatting.
upvoted 0 times
...
Floyd
3 months ago
I remember practicing a question similar to this, and I feel like using `${}` for variables might be the way to go, which makes me lean towards option C.
upvoted 0 times
...
Caprice
3 months ago
Okay, let's see here. I think I know the answer, but I want to double-check the syntax for string formatting in the logger. I don't want to mess this up.
upvoted 0 times
...
Nadine
3 months ago
Hmm, this looks like a straightforward logging question. I'll need to carefully read through the options and think about the best way to format the log message.
upvoted 0 times
...

Save Cancel