Should we 'take notes' while learning coding?

One of the biggest problems I seem to have while learning anything coding related is my lack of long-term memory with both structure of a codeblock and how it works. I’ll learn how to use and write one type of function one day, and forget it all next week/month. This tends to make me feel inclined to make myself notes of anything I’m unlikely to remember and might need in the future. For example, if-statements are practiced readily enough that I don’t feel the need to make notes, and if I do I’ll delete them soon after. Stuff like the html/java combo codeblocks though, I’m going to be at a total loss if i’m asked to take what I learnt and write a website from a blank document. I would need a cheatsheet or an api list. Is that bad? Or is that expected? Should we just focus on learning how to read and use these blocks of code? Or should we put equal focus on ‘remembering’ how to use and write them too? On the bright side I generally remember how to read code for at least half a year without any review.

-writing notes can slow learning down
-the constant review of stuff I just learnt a few days ago but forgot, can get me stuck in an inescapable loop that kills all future progression with feels of despair.

Should we just keep pushing forward when learning? Grasshopper seems to be setup for us to function in this manner, no notes, consult the library if u forget what something is or how its written, always move forward, we’ll retest you on most important stuff later so you don’t forget. Is this how we should base ourselves when learning coding? Or should we have a detailed string of notes like a personal cheatsheet when we finish learning a language? I mean most people learn many languages, do they keep notes…? Or do they just learn everything…and then rely on looking up API sheets when remembering how to write something? Is there a recommended javascript api sheet?

For ex. when learning the game-engine Pico8, after learning most of the stuff for it, I’ve been fine just consulting an api sheet like the following It’s a really streamlined system of coding though, especially since it’s using only a portion of lua. Just from grasshopper alone, Javascript seems infinitely more vast in its toolbox of codeblocks. So I’m just curious for information on the best approach given a lack of a photographic memory.