No, you don't need to memorize code, but you need to learn the basics by practicing.
There are many platform where you can practice coding, like freeCodeCamp, Codecademy, etc...
Once you have built a fundation with these languages, you need to practice by building projects.
I'm writing a post about that by the way.
Wdthor
Front-end Developer