I take notes on the React course on Udemy by Max. I only write down things that I deem important.
Go into a folder (like /section2) and there will be a README.md with all the notes.
To run .js files, you can either:
- Run them on your browser (browsers come with an engine for running .js files, but you will need to setup an HTML document).
- Use Node.js! (which is what I do).
- Go to https://nodejs.org/en/ and download the LTS (long term support) version.
- In your proejct folder type
npm init
(npm or node package manager helps setup your project) and enter all the details (or spam your Enter key). - Add
"type": "module"
to thepackage.json
. Seepackage.json
in this project if you need an example. Adding this is needed for running ES6 module stuff. - Make sure you're in the right folder with the
.js
file you want to run. Usecd <directory>
to move directories orcd ..
to go back. - Run
node my_file.js
in your terminal and voila!