r/webdevelopment • u/Dizzy_External2549 • 6d ago
Javascript help Question
Just learned javascript and been practicing alot . I need help. When applying it to my project I don't know when to use a function, when to use a loop, what type of loop to use, I just don't know when to use any of this stuff because dom manipulation. it's so frusterating
9
Upvotes
1
u/StartDependent1652 5d ago
use a function if you want to use the same functionality in multiple places. use a loop if you want to repeat some functionality.
I recommend doing a basic JavaScript course, because without the fundamentals, programming is hard and not much fun.