LeetCode #125 - Kth Largest Element in an Array (JavaScript)

const findKthLargest = (nums, k) => {
    return nums.sort((a, b) => b - a)[k - 1];
}