Ad
Code
Diff
  • describeAge = a => {
      ageL=[12,17,64]
      return "You're a(n) "+(["kid","teenager","adult"].find((i,id)=>{
        if(a<=ageL[id]){return i}
      })||"elderly")
    }
    • describeAge = a => {
    • //write your code here
    • }
    • ageL=[12,17,64]
    • return "You're a(n) "+(["kid","teenager","adult"].find((i,id)=>{
    • if(a<=ageL[id]){return i}
    • })||"elderly")
    • }