From e83b570d440cc669733e243825a88cae712e84c1 Mon Sep 17 00:00:00 2001 From: Devansh Gupta <41248639+raghav-wd@users.noreply.github.com> Date: Fri, 22 Oct 2021 13:26:26 +0530 Subject: [PATCH] merge: fixed some spellings (#773) * fixed some spellings * Update Data-Structures/Linked-List/SinglyLinkList.js Co-authored-by: Rak Laptudirm Co-authored-by: Rak Laptudirm --- Data-Structures/Linked-List/SinglyLinkList.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Data-Structures/Linked-List/SinglyLinkList.js b/Data-Structures/Linked-List/SinglyLinkList.js index 174d341b6..9e407ad12 100644 --- a/Data-Structures/Linked-List/SinglyLinkList.js +++ b/Data-Structures/Linked-List/SinglyLinkList.js @@ -1,7 +1,7 @@ /* SinglyLinkedList!! -* A linked list is implar to an array, it hold values. +* A linked list is similar to an array, it holds a list of values. * However, links in a linked list do not have indexes. With -* a linked list you do not need to predetermine it's size as +* a linked list you do not need to predetermine its size as * it grows and shrinks as it is edited. This is an example of * a singly linked list. */ @@ -17,7 +17,7 @@ const LinkedList = (function () { this.head = null } - // class node (constructor) + // Class node (constructor) // Creating Node with element's value const Node = (function () { function Node (element) { @@ -46,12 +46,12 @@ const LinkedList = (function () { } else { let currentNode = this.head - // Loop till there is node present in the list + // Loop till there is a node present in the list while (currentNode.next) { currentNode = currentNode.next } - // Adding node to the end of the list + // Adding node at the end of the list currentNode.next = node } // Increment the length