{"size": 565, "ext": "js", "max_stars_repo_path": "JavaScriptCore/Archive/JavaScriptFundamentals/Expressions-Conditional-Statements-and-Loops-Exercise/04.DistanceIn3D.js", "max_stars_repo_name": "stoyanov7/SoftwareUniversity", "max_stars_repo_stars_event_min_datetime": "2017-01-05T19:21:48.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-08T03:30:56.000Z", "max_issues_repo_path": "JavaScriptCore/Archive/JavaScriptFundamentals/Expressions-Conditional-Statements-and-Loops-Exercise/04.DistanceIn3D.js", "max_issues_repo_name": "stoyanov7/SoftwareUniversity", "max_issues_repo_issues_event_min_datetime": "2022-03-02T02:50:48.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-02T02:50:48.000Z", "max_forks_repo_path": "JavaScriptCore/Archive/JavaScriptFundamentals/Expressions-Conditional-Statements-and-Loops-Exercise/04.DistanceIn3D.js", "max_forks_repo_name": "stoyanov7/SoftwareUniversity", "max_forks_repo_forks_event_min_datetime": "2019-02-08T11:15:28.000Z", "max_forks_repo_forks_event_max_datetime": "2019-06-21T11:47:42.000Z"}
{"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 2, "avg_line_length": 25.6818181818, "max_line_length": 78, "alphanum_fraction": 0.5061946903}
function calculateDistanceIn3D(arr) {
     arr.map(x => +x);
 
     let firstPoint = { 
          x1: arr[0], 
          y1: arr[1], 
          z1: arr[2] 
     };

     let secondPoint = { 
          x2: arr[3], 
          y2: arr[4], 
          z2: arr[5] 
     };
 
     let result = Math.sqrt(
         (secondPoint.x2 - firstPoint.x1) * (secondPoint.x2 - firstPoint.x1) +
         (secondPoint.y2 - firstPoint.y1) * (secondPoint.y2 - firstPoint.y1) +
         (secondPoint.z2 - firstPoint.z1) * (secondPoint.z2 - firstPoint.z1));
 
     console.log(result);
 }