You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Congratulations @Kidd254 you have done a great job in this last Pull Request #33 ππ
Highlights β‘
β Beautiful design. π₯
β Used of ES6 π
However, we would like to share with you a suggestion β»οΈ that could make your project look even better.
In module popUp.js:
In your popUp() function, you have this code <h3 id="comments-header">Comments (0)</h3> that displays the title of the comments section and the comments counter using the function commentsCounter(). It could be much better to enclose the comment counter in a span tag and update it directly from your commentsCounter() function instead of updating the entire content of the h3 tag.
This could save you from having to render the word 'Comments' every time the comment counter is updated, which could benefit good code structuring and performance.
The text was updated successfully, but these errors were encountered:
Congratulations @Kidd254 you have done a great job in this last Pull Request #33 ππ
Highlights β‘
However, we would like to share with you a suggestion β»οΈ that could make your project look even better.
In your popUp() function, you have this code
<h3 id="comments-header">Comments (0)</h3>
that displays the title of the comments section and the comments counter using the functioncommentsCounter()
. It could be much better to enclose the comment counter in aspan
tag and update it directly from yourcommentsCounter()
function instead of updating the entire content of theh3
tag.It could be something like this:
in your
popUp()
function:<h3 id="comments-header">Comments (<span id="comment-counter">0</span>)</h3>
and in your
commentsCounter()
function:const commentsNumber = document.getElementById('comment-counter');
commentsNumber.innerText =
${comments};
This could save you from having to render the word 'Comments' every time the comment counter is updated, which could benefit good code structuring and performance.
The text was updated successfully, but these errors were encountered: