Calculator Project

Project Goals

Create a functional web calculator by adding JavaScript to pre-designed HTML and CSS.

Learning Objectives

  • Create and manipulate arrays
  • Select HTML elements using JavaScript
  • Use for-loops to iterate through elements
  • Write and call JavaScript functions

Project Steps

  1. Define an array of button texts
  2. Select all button elements
  3. Create a fillButtons() function
  4. Use a for-loop to set button inner HTML
  5. Call the fillButtons() function

Traffic Simulator Project

Project Goals

Create intelligent traffic light control algorithms that optimize traffic flow at a simulated intersection.

Learning Objectives

  • Work with custom JavaScript events
  • Use conditional (if/else) statements
  • Process real-time data to make automated decisions
  • Optimize algorithms based on multiple factors

Project Steps

  1. Create an event listener for the trafficStatsChange event
  2. Access traffic data from the event object
  3. Write conditional logic using if statements
  4. Implement progressively smarter signal control algorithms
  5. Test and refine your solution for optimal traffic flow