{"size": 273, "ext": "js", "max_stars_repo_path": "02. Programming fundamentals/29. Exercise - string operations/05. replace repeating letters.js", "max_stars_repo_name": "tdrv90/softuni-courses", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "02. Programming fundamentals/29. Exercise - string operations/05. replace repeating letters.js", "max_issues_repo_name": "tdrv90/softuni-courses", "max_issues_repo_issues_event_min_datetime": "2021-05-08T08:50:10.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-08T08:50:53.000Z", "max_forks_repo_path": "02. Programming fundamentals/29. Exercise - string operations/05. replace repeating letters.js", "max_forks_repo_name": "tdrv90/softuni-courses", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 22.75, "max_line_length": 49, "alphanum_fraction": 0.5531135531}
function replaceRepeatingChars(text) {
    let output = text[0];

    for (let i = 1; i < text.length; i++) {
        if (text[i] !== text[i - 1]) {
            output += text[i];
        }
    }
    console.log(output);
}

replaceRepeatingChars('aaaaabbbbbcdddeeeedssaa');