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
14
u/TangerineX Apr 05 '22 edited Apr 05 '22
I think people take Javascript to be way more complicated than it needs to be. In javascript, there's really 4 things to think about
"primitives", or various values. These are strings, numbers, and booleans
Arrays, which are just an ordered list of things
Objects, which is a map of key: value pairs, which are all primatives.
Functions, which take some input, and turn it into something else
Basically EVERYTHING in javascript is built off of these concepts. If you understand these, you've understood 90% of javascript.
Surprisingly, I've learned more about Javascript by learning Typescript instead, which gives a more opinionated way of using Javascript in a way that makes a bit more sense. It's also become the standard for writing stuff in many frameworks, such as Angular and React.