{"size": 794, "ext": "js", "max_stars_repo_path": "08 JAVASCRIPT SYNTAX AND BASIC WEB - EXERCISES/12. Multiple Values for a Key/Multiple Values for a Key.js", "max_stars_repo_name": "TsvetanNikolov123/Software-Technologies", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "08 JAVASCRIPT SYNTAX AND BASIC WEB - EXERCISES/12. Multiple Values for a Key/Multiple Values for a Key.js", "max_issues_repo_name": "TsvetanNikolov123/Software-Technologies", "max_issues_repo_issues_event_min_datetime": "2019-10-29T14:34:07.000Z", "max_issues_repo_issues_event_max_datetime": "2019-10-29T14:34:07.000Z", "max_forks_repo_path": "08 JAVASCRIPT SYNTAX AND BASIC WEB - EXERCISES/12. Multiple Values for a Key/Multiple Values for a Key.js", "max_forks_repo_name": "TsvetanNikolov123/Software-Technologies", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 20.8947368421, "max_line_length": 74, "alphanum_fraction": 0.5528967254}
function multipleValuesForKey(arr) {
    let input = [];
    let duplicateEntry = arr[arr.length-1];

    for (let i = 0; i < arr.length - 1; i++) {
        let token = arr[i].split(' ');
        let command = token[0];
        input[command] = token[1];

        if (duplicateEntry === command) {
            console.log(input[command]);
        }
    }

    if(duplicateEntry in input){

    }
    else{
        console.log("None")
    }
}

let input = ('3 bla', '3 alb', '2');
/*
let input = ('key value\n' +
    'key eulav\n' +
    'test tset\n' +
    'key').split('\n');
*/
multipleValuesForKey(input);

// Или тези два елемента извън скоупа на фукшъна са еквивалентни на
// multipleValuesForKey([ 'key value', 'key eulav', 'test tset', 'key' ]);
// като това ни е входа на задачата!!!



