How to understand the idea of object-oriented programming?

could you trouble the gods to explain the following with code?
A lot of people found on the Internet say that the feeling of prototype chain is not easy to understand.
if you want to implement an add function, how do you do it?

Feb.23,2022

object-oriented is a programming paradigm, an idea that to achieve object-oriented needs corresponding technical support, js prototype chain is one of the underlying technologies to achieve object-oriented.
if you want to figure out the underlying technology, just start, step by step, it is best to find a tutorial system to learn it, online search, a lot of free.
if you don't have this patience, Just learn TS.
but if you want to be proficient in js, you still have to have basic knowledge. Therefore, it is recommended that the basics be solid, otherwise there will be more pitfalls in the future.
this thing cannot be clearly explained in a few words. If a piece of code can make you understand object-oriented, you may have read those articles already.

Menu