mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-07 19:17:33 +08:00
Replaced use of var with const | Bogo Sort
This commit is contained in:
@ -48,7 +48,7 @@ function bogoSort (items) {
|
|||||||
|
|
||||||
// Implementation of bogoSort
|
// Implementation of bogoSort
|
||||||
|
|
||||||
var ar = [5, 6, 7, 8, 1, 2, 12, 14]
|
const ar = [5, 6, 7, 8, 1, 2, 12, 14]
|
||||||
// Array before Sort
|
// Array before Sort
|
||||||
console.log(ar)
|
console.log(ar)
|
||||||
bogoSort(ar)
|
bogoSort(ar)
|
||||||
|
Reference in New Issue
Block a user