r/learnprogramming • u/Temporary-Warthog250 • Apr 05 '22
Name one programming/comp sci concept you never understood and if you understand it, try to explain it to them
Name a programming concept such as virtual functions, pointers, certain algorithms, etc that you always had a hard time understanding and why.
Someone else who reads yours and does understand it, try to explain it to them to help them learn
1.6k
Upvotes
1
u/__Fred Apr 06 '22
Can you explain the "prototype" property?
If I want to access a property on an object and JS can't find it, it looks inside the prototype, right? No... https://www.w3schools.com/js/js_object_prototypes.asp I used to understand this. It feels like the most complicated part of JS but you don't need it in TypeScript.
Okay... JS builds up OOP out of dictionaries and it needs "prototype" for that. Maybe it would be useful to see how one would go about doing that to Python?