From a415c2055b25fcb1088f7d28fa49e836865167ab Mon Sep 17 00:00:00 2001 From: King Josaphat Chewa Date: Tue, 26 Mar 2019 04:44:06 +0100 Subject: [PATCH] Better use of "let" (#32800) --- .../algorithms/sorting-algorithms/bubble-sort/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guide/english/algorithms/sorting-algorithms/bubble-sort/index.md b/guide/english/algorithms/sorting-algorithms/bubble-sort/index.md index 7aa714fe6c..ed63749f95 100644 --- a/guide/english/algorithms/sorting-algorithms/bubble-sort/index.md +++ b/guide/english/algorithms/sorting-algorithms/bubble-sort/index.md @@ -55,11 +55,11 @@ Now, the array is already sorted, but our algorithm does not know if it is compl ### Example in JavaScript ```js -let arr = [1, 4, 7, 45, 7,43, 44, 25, 6, 4, 6, 9]; -let sorted = false +let arr = [1, 4, 7, 45, 7,43, 44, 25, 6, 4, 6, 9], + sorted = false; while(!sorted) { - sorted = true + sorted = true; for(var i=0; i < arr.length; i++) { if(arr[i] < arr[i-1]) { let temp = arr[i];