0

Someone help me solve this??

Write a function called calcAge. This function should take one parameter and it should return you implied age( dont worry about months). Call the function passing the current year as the parameter.

2nd Apr 2018, 3:10 AM
Coder1995
Coder1995 - avatar
1 Answer
+ 2
Assuming the year you were born is defined outside of the function, but within its scope; let yearBorn = 1974; function calcAge(currentYear) { return currentYear - yearBorn; } console.log(calcAge(2018));
2nd Apr 2018, 3:48 AM
ChaoticDawg
ChaoticDawg - avatar