optimize code:
function combinedRating(ratings) {
    ratings.sort((a, b) => b - a);
    let CR = ratings[0];
    for(let i = 1; i < ratings.length; i++) {
        CR += (ratings[i] / 100) * (100 - CR);
    }
    return Math.round(CR / 10) * 10;
}

let ratings = [60, 30, 20];  // Example ratings
console.log(combinedRating(ratings));