{"size": 606, "ext": "js", "max_stars_repo_path": "09 - Conditional Statements Advanced - More Exercise/08 - Point on Rectangle Border/index.js", "max_stars_repo_name": "EmbraceTheDefeat/Programming-Basics-JS---April-2021---Software-University", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "09 - Conditional Statements Advanced - More Exercise/08 - Point on Rectangle Border/index.js", "max_issues_repo_name": "EmbraceTheDefeat/Programming-Basics-JS---April-2021---Software-University", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "09 - Conditional Statements Advanced - More Exercise/08 - Point on Rectangle Border/index.js", "max_forks_repo_name": "EmbraceTheDefeat/Programming-Basics-JS---April-2021---Software-University", "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": 35.6470588235, "max_line_length": 86, "alphanum_fraction": 0.5610561056}
function pointOnRectangleBorder(input) {
    const x1 = Number(input[0]);
    const y1 = Number(input[1]);
    const x2 = Number(input[2]);
    const y2 = Number(input[3]);
    const x = Number(input[4]);
    const y = Number(input[5]);

    let firstCondition = (x == x1 || x == x2) && (y >= y1 && y <= y2);
    let secondCondition = (y == y1 || y == y2) && (x >= x1 && x <= x2);

    const result = firstCondition || secondCondition ? 'Border' : 'Inside / Outside';
    console.log(result);
}

pointOnRectangleBorder([2, -3, 12, 3, 8, -1]);
pointOnRectangleBorder([2, -3, 12, 3, 12, -1]);