Urban legend, former IMDb editor, conference speaker, Seattle CoderDojo organizer. Love finding inspiration in dev tools and products, then sharing it with dev communities.
Location
Seattle, WA
Education
BA in Creative Writing, self-taught + some certification courses in modern programming languages
While working on a selection sort (posting soon), I realized I could have used a destructuring assignment to cut two lines from the function.
Turn:
swaps = true;
arr[ind] = arr[ind + 1];
arr[ind + 1] = val;
Into:
[arr[ind], arr[ind + 1], swaps] = [arr[ind +1], arr[ind], true];
I think it would make it less readable, but it would definitely make it shorter.