I was trying to solve Exercise 6 Chapter 2 and I solved it successfully used cookies.
Then I read the exercise again and realized that the task included the use of functions. I though about it for some time and couldn't find the reason of using functions in this case. So I referred to exercise answers...
??? what the...
there was some block of code which didn't have any connection with the given task.
Can anybody explain this and possibly provide a satisfying solution to this Exercise.