I am so confused and getting frustrated with JS

Programming is 100% breaking down a problem into parts you can work with. You can break down in a problem in a 100 different ways, just figuring out what way is best is key.

Doesn’t matter the programming language or the program you are writing, it all needs to be broken down into smaller steps.

One way programmers like to do this is object oriented programming. Store functions in constructor classes and then make copies of the constructor classes when you need to use those functions (even JavaScript itself does this).

It gets more basic then objects if you think about how programmers simply break down problems into functions. Storing code in functions allows for later reuse.

You could create a entire program without declaring your own functions or objects, its just not the best way to break it down though.

2 Likes