I'm starting in javascript and I came across a question. I need the user to enter their date of birth, which I will store day, month and year in different variables. What I need is to separate the values of these variables and then make a sum with them.
For example, the user insists that the birth year is 1994, so I need my program to make 1 + 9 + 9 + 4 = 23, which will be stored in the year variable.
Thank you!