DEV Community

Discussion on: JavaScript Functions: Explain Like I'm Five

Collapse
 
firefox700101 profile image
Raymond

Does the Arrow Function way really work in this case? I copied and pasted the code to run and set the birthyear to 2020, it still says 'eligible'.

I noticed there is a 'eligibleToDrive' and also a 'EligibleToDrive'. Only the first letter is different, but never seen where to use 'EligibleToDrive'.

Collapse
 
sumusiriwardana profile image
Sumudu Siriwardana

Hi Raymond, sorry for the confusion and there was an error. And thank you for pointing it out. And I corrected it and added a new code.

Collapse
 
firefox700101 profile image
Raymond

Sumudu. It works now. Thank you for the correction.