Go to project folder
cd ~/Projects/sei-premium-prep-72
Open VS Code
code .
Open Live Server
- On VS Code press
command + shift + p - Type
Live Serverand pressEnter
note: after step 2 a new browswer window should open with the url being http://localhost:5500
- Create a folder with the exercise name under the correct folder hierarch. For example:
For the exercise findSmallestElement on Module 1, Part 5 you should create a folder at:
sei-premium-prep-72/Module1/Part5/findSmallestElement
-
Inside the new folder, create an index.html and a javascript file named aftter the exercise name (same as the new folder name).
-
Open index.html and type
html. VS Code will suggest a few different options. Selecthtml:5and pressenter. VS Code will then, add the basic markup for an HTML page. -
Inside the
<body>tag, typescript. VS Code will suggest a few different options. Selectscript:src. VS Code will add a script tag with a src property to wich, you should enter./JAVASCRIPT_FILE_NAME.js. Using our example, the src should be./findSmallestElement.js. -
Do the work on the javascript file.
-
If Live Server is not yet running, then run the command to start it. See the
Run local serversession above. -
If not yet open, on a browser, go to
http://10.0.0.172:5500/orhttp://localhost:5500/ -
Open the dev tools. One way to do it is pressing
cmnd + option + j. On the dev tools, click onconsoleto see the output of your codeconsole.logand clic onsourceand on the file namefindSmallestElement.jsto see the source code.
git add .
git commit -m 'Description of your changes'
git push