Both. The idea is that you learn a concept, then try it out in a project. As you work on your projects you are going to encounter things you don’t know or problems. You solve those problems by researching and learning the concepts. They go hand-in-hand.
I suggest you pick up a book, learn a few basic items (like chapters 1-3) and then try a simple project. Usually most books will have you do a “hello world” project as your first project and that will introduce you to setting up programs and running them along with variables and such.
But you should do both and then pair it up with a forum like this to ask questions you don’t see in the research material and are stumbling across in the project.
I am not familiar with the book itself, but like I said most books show you a basic program within the first few chapters. I suspect that the book will actually show you many projects and will start very simple. Just follow the book.
No, most of us are volunteers and veteran experts.
To add another recommendation, you could also look at this:
This book doesn’t assume any prior programming knowledge and has some nice challenges at the end of each chapter to help you asses your progress.
IMO it is better to find something you are passionate about or which motivates you and work towards building that. There are various well known beginner-level projects which you could probably find a tutorial on (e.g. calculator, todo list, weather app etc) but you will be more motivated and the learning effect will be greater if you build something that you or someone you know might use.
For example what about a user script to add some missing functionality to a web page you visit regularly?
It might also be too early to introduce a new technology, but programming a desktop app with a library like Electron can be quite rewarding.
help here too, please
that is a god thing! i really appreciate you being there for help
good!!!
if you leave any debugging code in the production files your users will see your confusing debugging output.
lost here
what is debugging and production files?
You can also select an HTML element on the page and add or change the text, or you can create an element in JavaScript and append it to the page with the information. This is the major way that you’ll show content/the results of your program to your users, but when you use it for debugging, it has the downside of being visible to users. This is a powerful and useful way to show content (debugging or otherwise).
kindly clarify
The output will then appear in the console, and you can figure out where your program went wrong.
how? example, please
While I would still recommend removing console.log statements from production code
again, I thank you! i really appreciate your patience
For what it’s worth, I would generally say the right project is the first step. Not “better”, or worse for that matter, but find a project. Ideally, one that you dont immediately know how to do every part of, but you’ve got a decent idea of how to break it down.
Have the abstract notion of “I want to do XYZ.”
Extract it. “Well to do X i would need something that can do this” and then… go find something that can do that thing. Google-fu. “Javascript change a font color” or “Javascript sliding animation”, etc.
Take the project, learn the concepts for that project. Bank the knowledge of those concepts, to choose your next project… and just keep going around the loop.
As long as you keep trying for just that little bit more of “Well i dont really know how to do X but I’ll try…”, you can learn just about anything (even if it is truly impossible, you’ve learned that it’s impossible. The project might “fail”, but your knowledge grows, so you can try something different next).