diff --git a/Data-Structures/Linked-List/CycleDetection.js b/Data-Structures/Linked-List/CycleDetection.js index b8e16fe71..910fe2214 100644 --- a/Data-Structures/Linked-List/CycleDetection.js +++ b/Data-Structures/Linked-List/CycleDetection.js @@ -22,7 +22,7 @@ function main () { while (fast != null && fast.next != null && slow != null) { fast = fast.next.next slow = slow.next - if (fast == slow) { + if (fast === slow) { return true } }