Day 1
- Introductions
- Intro to Javascript
- Daily Challenge
- Syntax
- The Console
- Take Home Challenge
- What is Javascript?
- Additional Reading: Mozilla Developer Network - Javascript Introduction
- Javascript Versions
- Current Version: ECMAScript 6 (2015)
- How to use Javscript (3 ways):
- Inline (not recommended)
<button onclick="confirm('Are you sure?')">Delete</button>
<script>let pageElement = document.getElementById('my-id');</script>
<script src="js/script.js"></script>
- Go to github.com
- Create a new repository named "javascript-practice"
- Clone your new repository
- Open your project in Visual Studio Code
- Add the following files:
- index.html
- js/script.js
- css/style.css (optional)
- Link your script file externally
- git add, commit, and push changes to your
main
branch
- Syntax Basics
- White Space
- Case Sensitivity
- Comments
- Semicolons
- How to find it
- Open browser > right click > inspect > console
- console.log()
- Using your Daily Challenge repository:
- Create a new branch called "take-home"
- Add the following to your script file:
- Single line comment
- Multi-line comment
- Log your name to the console
- Log your favorite food to the console
- git add, commit, and push your changes to your
take-home
branch