Do I have to remember the code?

Hi, I am reading a book now by Jon Duckett for JavaScript. I am reading couple pages and then I write the code, and I repeat the process. There was a code to get the exact time in your area, but I don’t remember how to exactly write it from my head. Do I have to remember or can I just save the code somewhere and use it whenever I need it? For example this: https://tecadmin.net/get-current-date-time-javascript/

Hi.

I thinks it’s noit a big problem that you cannot remember the code after coding only once. It will be great if you save useful links somewhere, sou you can then easily find what you need.

I guess, once you have to use it more than once you will probably remember the code snippet for it.