{"size": 519, "ext": "js", "max_stars_repo_path": "JS Advanced/Exercises/15. Advanced Functions - Exercise/02. Argument Info.js", "max_stars_repo_name": "NeikoGrozev/SoftUni", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "JS Advanced/Exercises/15. Advanced Functions - Exercise/02. Argument Info.js", "max_issues_repo_name": "NeikoGrozev/SoftUni", "max_issues_repo_issues_event_min_datetime": "2022-02-14T05:27:04.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-02T11:50:30.000Z", "max_forks_repo_path": "JS Advanced/Exercises/15. Advanced Functions - Exercise/02. Argument Info.js", "max_forks_repo_name": "NeikoGrozev/SoftUni", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 6, "max_forks_count": null, "avg_line_length": 25.95, "max_line_length": 75, "alphanum_fraction": 0.4874759152}
function solve(...input) {

    Object.entries(input.reduce((acc, curr) => {
        let typeOfArg = typeof curr;
        console.log(`${typeOfArg}: ${curr}`)

        if (!acc.hasOwnProperty(typeOfArg)) {
            acc[typeOfArg] = 0;
        }

        acc[typeOfArg]++;

        return acc;
    }, {}))
        .sort((a, b) => b[1] - a[1])
        .map(([type, count]) => `${type} = ${count}`)
        .forEach((el) => console.log(el))
}

solve('cat', 'dog', 42, 50, 70, function () { console.log('Hello world!')})