- Install Visual Studio Code
- Install the plugin Live Share
- Log to Live Share with your GitHub account
- Open the shared project supplied by your trainer
- Create an empty file
index.html - Add a HTML 5 structure to
index.html - In the
<body>, add a<script>tag - In the <script> tag, add the code
console.log('Hello World!'); - Open the index.html file in a browser
- Open the browser console (F12)
- Verify that you can read 'Hello World!'
- Add a prompt to ask a name
- Show
Hello {name}!instead of 'Hello World!' - Add a condition: if the name is empty, show 'Hello World!', else show
Hello {name}!