{"size": 625, "ext": "js", "max_stars_repo_path": "5. JavaScript Syntax, Part I/Code Challenges JavaScript Fundamentals/lifePhase Challenge/main.js", "max_stars_repo_name": "Enthus-io/Front-End-Engineer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "5. JavaScript Syntax, Part I/Code Challenges JavaScript Fundamentals/lifePhase Challenge/main.js", "max_issues_repo_name": "Enthus-io/Front-End-Engineer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "5. JavaScript Syntax, Part I/Code Challenges JavaScript Fundamentals/lifePhase Challenge/main.js", "max_forks_repo_name": "Enthus-io/Front-End-Engineer", "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": 18.3823529412, "max_line_length": 77, "alphanum_fraction": 0.5568}
// Write your function here:
function lifePhase(age) {
  let phase;

  if (age <= 140 && age >= 0) {

    if (age >= 65) {
      phase = "senior citizen";
    } else if (age >= 20) {
      phase = "adult";
    } else if (age >= 13) {
      phase = "teen";
    } else if (age >= 4) {
      phase = "child";
    } else {
      phase = "baby";
    }
  } else {
    phase = "This is not a valid age";
  }

  return phase;
}







// Uncomment the line below when you're ready to try out your function
console.log(lifePhase(5)) //should print 'child'

// We encourage you to add more function calls of your own to test your code!