DEV Community


Discussion on: ELI5: Functions vs. Class/Constructor in Javascript

nestedsoftware profile image
Nested Software • Edited

This is not a direct answer to your question, but JavaScript is a very odd language with a lot of confusing quirks - probably because it was originally thrown together over literally just a few days. Over the years, people have tried to cover up these idiosyncrasies with additional syntax to make the language at least feel closer to something like Java or C#. Unfortunately, these similarities are rather superficial, so you have to be careful to really understand what's going on to avoid some common bugs that can arise from using the language in the same way that you would in Java or C#. In your position, as someone who doesn't know Java, C# or similar languages, that adds up to even more confusion...

So, what to do? My suggestion is to not worry too much about the details of this stuff right now. Learn from tutorials that focus on specific programming tasks, like creating and processing a form, or drawing things on the screen, or even basic math and data structure manipulations.

As time goes on and you learn how to do practical things, hopefully you will feel empowered to understand a bit more about how things work.

gnio profile image
Gnio Author

Thanks. I've been told something similar from someone else. It just really bothers me to move on without really understanding what's going on. I think eventually I will have to. Thanks for taking the time to reply!