Title: Bubble Sort in JavaScript - Runnable Code Snippet
Open Graph Title: Bubble Sort in JavaScript - Runnable Code Snippet
X Title: Bubble Sort in JavaScript - Runnable Code Snippet
Description: Sort an array using the bubble sort algorithm by repeatedly swapping adjacent elements. Runnable JavaScript snippet with live execution.
Open Graph Description: Sort an array using the bubble sort algorithm by repeatedly swapping adjacent elements. Runnable JavaScript snippet with live execution.
X Description: Sort an array using the bubble sort algorithm by repeatedly swapping adjacent elements. Runnable JavaScript snippet with live execution.
Keywords:
Opengraph URL: https://tempercode.dev/snippets/bubble-sort-javascript
Domain: tempercode.dev
{"@context":"https://schema.org","@type":"SoftwareSourceCode","name":"Bubble Sort","description":"Sort an array using the bubble sort algorithm by repeatedly swapping adjacent elements.","programmingLanguage":"JavaScript","text":"const a = [...arr];\nfor (let i = 0; i < a.length; i++) {\n for (let j = 0; j < a.length - i - 1; j++) {\n if (a[j] > a[j + 1]) [a[j], a[j + 1]] = [a[j + 1], a[j]];\n }\n}\nreturn a;"}
| theme-color | #0c0d12 |
| color-scheme | dark |
| author | Temper |
| creator | Temper |
| publisher | Temper |
| og:image | https://tempercode.dev/og-image.png |
| og:type | article |
| twitter:card | summary_large_image |
| twitter:image | https://tempercode.dev/og-image.png |
Links:
Viewport: width=device-width, initial-scale=1