The-complete-guide-to-modern-JavaScript icon indicating copy to clipboard operation
The-complete-guide-to-modern-JavaScript copied to clipboard

Chapter 4: Template literals -Pass a function inside a template literal

Open realloka opened this issue 1 year ago • 3 comments

// display all our groceries in a p tag, the last one will include all the one from the array **others**
->
It appears that the "**others**" part in the comment of the JavaScript source was just printed out 
while trying to express it in bold in Markdown syntax.

Is that right?

realloka avatar Sep 05 '23 08:09 realloka

Yes, you are correct. The comment in the JavaScript source code appears to be an attempt to emphasize the word "others" by making it bold, as you would in Markdown syntax. However, in JavaScript comments, you cannot apply formatting like you can in Markdown or rich text editors, so the comment text "others" was simply printed as is, without any formatting applied.

DonMiller9294 avatar Sep 05 '23 08:09 DonMiller9294

github issues supports Markdown, so it just appeared in bold. It has been edited to look like the original.

Actually, I bought a paper book, and it could have been written in bold, but it came out in Markdown like **, so I was trying to ask about the author's intention.

realloka avatar Sep 05 '23 09:09 realloka

I understand, let me do a little more research.

DonMiller9294 avatar Sep 14 '23 18:09 DonMiller9294