From 75568e9b5965860de2b0b091e4eb5425c1342678 Mon Sep 17 00:00:00 2001 From: Arunkumar1712 <116170537+Arunkumar1712@users.noreply.github.com> Date: Thu, 4 Jan 2024 17:59:48 +0530 Subject: [PATCH] Sort an array without using in build functions Code to sort the given array without using Inbuilt functions --- sortarray.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sortarray.js diff --git a/sortarray.js b/sortarray.js new file mode 100644 index 0000000..2b4e852 --- /dev/null +++ b/sortarray.js @@ -0,0 +1,11 @@ +var a=[1,3,2,7,4,10,9]; +for(var i=0;i0){ + a[i]=a[i+1]; + a[i+1]=a1; + } +} +console.log(a); \ No newline at end of file