diff --git a/core/modules/comment/js/comment-new-indicator.js b/core/modules/comment/js/comment-new-indicator.js
index 8a2bf07..8881b44 100644
--- a/core/modules/comment/js/comment-new-indicator.js
+++ b/core/modules/comment/js/comment-new-indicator.js
@@ -11,15 +11,15 @@
   "use strict";
 
   /**
-   * Render "new" comment indicators wherever necessary.
+   * Renders "new" comment indicators wherever necessary.
    *
    * @type {Drupal~behavior}
    */
   Drupal.behaviors.commentNewIndicator = {
     attach: function (context) {
-      // Collect all "new" comment indicator placeholders (and their corresponding
-      // node IDs) newer than 30 days ago that have not already been read after
-      // their last comment timestamp.
+      // Collect all "new" comment indicator placeholders (and their
+      // corresponding node IDs) newer than 30 days ago that have not already
+      // been read after their last comment timestamp.
       var nodeIDs = [];
       var $placeholders = $(context)
         .find('[data-comment-timestamp]')
@@ -48,6 +48,12 @@
     }
   };
 
+  /**
+   * Processes the markup for "new comment" indicators.
+   *
+   * @param {jQuery} $placeholders
+   *   The elements that should be processed.
+   */
   function processCommentNewIndicators($placeholders) {
     var isFirstNewComment = true;
     var newCommentString = Drupal.t('new');
diff --git a/core/modules/comment/js/node-new-comments-link.js b/core/modules/comment/js/node-new-comments-link.js
index fce15aa..60a3c50 100644
--- a/core/modules/comment/js/node-new-comments-link.js
+++ b/core/modules/comment/js/node-new-comments-link.js
@@ -18,8 +18,8 @@
   Drupal.behaviors.nodeNewCommentsLink = {
     attach: function (context) {
       // Collect all "X new comments" node link placeholders (and their
-      // corresponding node IDs) newer than 30 days ago that have not already been
-      // read after their last comment timestamp.
+      // corresponding node IDs) newer than 30 days ago that have not already
+      // been read after their last comment timestamp.
       var nodeIDs = [];
       var $placeholders = $(context)
         .find('[data-history-node-last-comment-timestamp]')
@@ -35,7 +35,8 @@
             return true;
           }
           else {
-            // Remove this placeholder link from the DOM because we won't need it.
+            // Remove this placeholder link from the DOM because we won't need
+            // it.
             remove($placeholder);
             return false;
           }
@@ -52,6 +53,15 @@
     }
   };
 
+  /**
+   * Hides a "new comment" element.
+   *
+   * @param {jQuery} $placeholder
+   *   The placeholder element of the new comment link.
+   *
+   * @return {jQuery}
+   *   The placeholder element passed in as a parameter.
+   */
   function hide($placeholder) {
     return $placeholder
       // Find the parent <li>.
@@ -62,10 +72,25 @@
       .end().hide();
   }
 
+  /**
+   * Removes a "new comment" element.
+   *
+   * @param {jQuery} $placeholder
+   *   The placeholder element of the new comment link.
+   */
   function remove($placeholder) {
     hide($placeholder).remove();
   }
 
+  /**
+   * Shows a "new comment" element.
+   *
+   * @param {jQuery} $placeholder
+   *   The placeholder element of the new comment link.
+   *
+   * @return {jQuery}
+   *   The placeholder element passed in as a parameter.
+   */
   function show($placeholder) {
     return $placeholder
       // Find the parent <li>.
@@ -76,6 +101,12 @@
       .end().show();
   }
 
+  /**
+   * Processes new comment links and add appropriate text in relevant cases.
+   *
+   * @param {jQuery} $placeholders
+   *   The placeholders elements of the current page.
+   */
   function processNodeNewCommentLinks($placeholders) {
     // Figure out which placeholders need the "x new comments" links.
     var $placeholdersToUpdate = {};
@@ -88,8 +119,8 @@
       var nodeID = $placeholder.closest('[data-history-node-id]').attr('data-history-node-id');
       var lastViewTimestamp = Drupal.history.getLastRead(nodeID);
 
-      // Queue this placeholder's "X new comments" link to be downloaded from the
-      // server.
+      // Queue this placeholder's "X new comments" link to be downloaded from
+      // the server.
       if (timestamp > lastViewTimestamp) {
         $placeholdersToUpdate[nodeID] = $placeholder;
       }
@@ -105,8 +136,15 @@
       return;
     }
 
-    // Render the "X new comments" links. Either use the data embedded in the page
-    // or perform an AJAX request to retrieve the same data.
+    /**
+     * Renders the "X new comments" links.
+     *
+     * Either use the data embedded in the page or perform an AJAX request to
+     * retrieve the same data.
+     *
+     * @param {object} results
+     *   The server response for new comment links
+     */
     function render(results) {
       for (var nodeID in results) {
         if (results.hasOwnProperty(nodeID) && $placeholdersToUpdate.hasOwnProperty(nodeID)) {
