There are an infinite number of things you can do with code, why waste time just trying to memorize a few lines.
“Never memorize something that you can look up” — Albert Einstein
The real skill that you’re learning isn’t how to code, it’s how to find out something that you don’t know.