0

can anyone help with the code for below question

Write a function calculateAge() that takes your birthday in the format dd,mm,yyyy and returns your age. Sample function input calculateAge(28,02,1992) Output - 27

25th Jul 2019, 5:41 AM
Ganta Ganesh
Ganta Ganesh - avatar
1 Resposta
+ 1
const calculateAge = (_,__,y)=>new Date().getFullYear()-y;
25th Jul 2019, 6:00 AM
Calviղ
Calviղ - avatar