{"size": 789, "ext": "js", "max_stars_repo_path": "Syntax,Fuynctions and Statements/Exercise/roadRadar.js", "max_stars_repo_name": "ntochevski/Js-Advanced", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Syntax,Fuynctions and Statements/Exercise/roadRadar.js", "max_issues_repo_name": "ntochevski/Js-Advanced", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Syntax,Fuynctions and Statements/Exercise/roadRadar.js", "max_forks_repo_name": "ntochevski/Js-Advanced", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.56, "max_line_length": 138, "alphanum_fraction": 0.5513307985}
function solve(speed, area) {
    let speedLimits = {
        motorway: 130,
        interstate: 90,
        city: 50,
        residential: 20,
    }
    let speedLimit = speedLimits[area];
    let typeOfSpeeding = '';

        if (speed <= speedLimit ) {
            console.log(`Driving ${speed} km/h in a ${speedLimits[area]} zone`);
            return;
        }else if(speed - speedLimit <= 20){
            typeOfSpeeding = 'speeding';
        }else if (speed - speedLimit <= 40) {
            typeOfSpeeding = 'excessive speeding';
        }else {
            typeOfSpeeding = 'reckless driving';
        }
        
        console.log(`The speed is ${speed - speedLimit} km/h faster than the allowed speed of ${speedLimits[area]} - ${typeOfSpeeding}` );
}

solve(200, 'motorway' );