Sorting arrays in JavaScript is done via the method arr […]...