I started learning JS on my own about a month ago.
While there are many tutorials explaining how to build simple programs like a clock or slightly complicated animation, it feels like copying them is not very productive.
Seeing the many built-in properties/methods/functions, I am struggling to understand how do programmers know (or better yet, feel) which ones to use when programming? Is it necessarily done by googling for answers? Going over entire library entries seems crazy and utterly time consuming, but does it actually have to be done that way?
I feel like this is a common issue, no matter which programming language one starts to learn. I hope you would kindly try to remember your early programming days and advice on a more efficient method to code.
There is no need to link me for books or tutorials- I am truly interested in hearing out your personal tips and experience.
Thank you for your replies!
I’ll go out on a limb and say that nobody knows all of them - most people won’t even use most of them, but some of them - like ‘window’ and ‘document’ - you will probably use a lot.
You’ll pick these up over time and (if you’re anything like me) at some point you’ll struggle over the solution to some problem, only to realise later that there’s a built-in that ‘just works’. Frustrating. But you’ll remember the next time
Some of the methods that I use regularly, I still have to look up basically every day (eg; slice/splice) because I can never remember the order of the parameters. MDN (mozilla developer network) is the best place to go - I search 'mdn + '. I also have http://devdocs.io/ installed in Chrome which you can use to keep an offline copy of all the docs.