1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00
joplin/packages/app-cli/tests/html_to_md/code_multiline_1.md

24 lines
403 B
Markdown
Raw Normal View History

```
const bubbleSort = (originalArray) => {
let swapped = false
const a = [...originalArray]
for (let i = 1; i < a.length - 1; i++) {
swapped = false
for (let j = 0; j < a.length - i; j++) {
if (a[j + 1] < a[j]) {
;[a[j], a[j + 1]] = [a[j + 1], a[j]]
swapped = true
}
}
if (!swapped) {
return a
}
}
return a
}
```