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>
                  
    • Internal (sometimes appropriate)
    •               <script>let pageElement = document.getElementById('my-id');</script>
                  
    • External (preferred method of including JS)
    •               <script src="js/script.js"></script>
                  
  1. Go to github.com
  2. Create a new repository named "javascript-practice"
  3. Clone your new repository
  4. Open your project in Visual Studio Code
  5. Add the following files:
    • index.html
    • js/script.js
    • css/style.css (optional)
  6. Link your script file externally
  7. git add, commit, and push changes to your main branch
  • How to find it
  • Open browser > right click > inspect > console
  • console.log()
  • Using your Daily Challenge repository:
    1. Create a new branch called "take-home"
    2. 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
    3. git add, commit, and push your changes to your take-home branch