So, I’m on the last project of the JavaScript Module (the cash register) and I just realized that once I’m done with this project, I still don’t know how to use JavaScript in the Real world.
For example, we know many websites use JavaScript; but freeCodeCamp doesn’t seem to teach how to apply JavaScript to a website (Or maybe I’m getting ahead of myself and somewhere in another module they actually teach you that ??). So, we know how to actually code in JavaScript using FCC console, but where do I put this code in a real website? How do I do it? Can it be done without CodePen? etc, etc.
I’m very grateful to freeCodeCamp for teaching this stuff (for free!). Now I wonder if any of you have recommendations on where to learn (free or not) how to apply this knowledge in the real world.
You use JavaScript to manipulate the DOM. Example, user clicks a button. You fire a function that fetches data and loop it out in <li></li> elements. JavaScript is pretty much event handeling, a user clicks, hovers or move something and something happens. That’s JavaScript and to some extent CSS.
In a real website you put it in a JS file and load it up in your HTML doc inside a script tag.
Or if you write in example React, everything is done with JS, the HTML just holds a root div.