Recently I created a small app using JavaScript, and I would love for some JavaScript developers if they have the time of day, to tell me their opinions so I can grow and improve.
I'm mostly working on back-end tasks with PHP and Go, but I thought making something small in JS would be fun attempt.
Basically it's an app that sorts an image based on users choice of sorting algorithm. You first say how many rows and columns want, and past an image URL. The app then shuffles it and asks you what sort do you want.
It is then visual when sorting it back to original.
I know this is not a typical question, but I would love to get some opinions on code, and look of app. So, what do you think? Any recommendation ?
GitHub of project:
https://github.com/fvukojevic/Image-Sorting-Visualizer (if someone wants to star 😁 😁) Application: https://image-sorting-visualizer.herokuapp.com/
Example of one sorting algorithm where I'm saving every swap into an array of "animations":
function bubbleSort(arrayCopy, animations) {
let sorted = false;
let counter = 0;
while(!sorted){
sorted = true;
for(let i=0;i<arrayCopy.length -1 - counter; i++) {
if(arrayCopy[i].val > arrayCopy[i+1].val){
swap(i, i+1, arrayCopy);
sorted = false;
animations.push([i, i+1]);
}
}
counter++
}
}