feat: adjust swap grammar (#175)

* feat: adjust swap grammar

* fix: grammar
This commit is contained in:
zoomdong
2020-05-23 14:01:41 +08:00
committed by GitHub
parent e9d4da4ef5
commit b2f6471b89
7 changed files with 10 additions and 29 deletions

View File

@ -59,9 +59,7 @@ function getRandomInt (min, max) {
}
function Swap (arr, x, y) {
const temp = arr[x]
arr[x] = arr[y]
arr[y] = temp
[arr[x], arr[y]] = [arr[y], arr[x]]
}
// testing