Dynamic Greeting Part 2
Opening The Files
- Open your "web" folder, "javascript" folder, and then "greeting" folder.
- View index.html in a Web browser.
- View the source of index.html.
- Wait for Ms. Hurlburt to begin the demonstration.
Topics Included
- Opening external script source to view
- Opening script in Notepad
- Following skeletal plan
- Entry point: function definition
- Accessing elements by ID
- Assigning variables
- Logic: How do we determine part of day?
- Date object at W3Schools
- Makind decisions based on part of day
- Changing page content
- Separating partOfDay logic to separate function