Table of Contents
Calculator: JavaScript
-
Adding JavaScript to the Calculator
Brian Holt introduces the next project, which is to add JavaScript to the calculator that was previously coded with HTML and CSS. -
Calculator HTML & CSS Setup
Brian demonstrates how to get the HTML & CSS to use for building the second part of the calculator project. -
Writing the JavaScript
Brian jumps into coding the inner workings of the calculator, and analyzes the planning process for each piece. -
Examining Events in the Browser
Brian demonstrates what an event looks like in the browser, and also how to test the calculator by logging to the console. -
Handling Symbols & Numbers
Brian breaks down the structure of the calculator functionality by planning how best to handle numbers and symbols. -
Displaying to the Screen
Brian codes the part of the program to display the running total to the calculator screen. -
Inserting Symbols
Brian begins coding the section of the program that handles mathematical and other symbols. -
Rerendering
Brian demonstrates how to display changes to the calculator screen when the calculator state changes. -
Handling Back Arrow
Brian discusses different ways the back arrow functionality can be implemented. -
Handling Math
Brian codes the first part of the functionality that handles mathematical symbols on the calculator. -
Flush Operation
Brian implements the code that performs math and then demonstrates how to debug code by logging to the console. -
Equals
Brian adds the functionality for the equals button to the calculator. -
Review and Q&A
Brian summarizes the logic of the calculator's JavaScript code and then adds functionality for the back arrow. -
Debugging
Brian demonstrates some of the capabilities of the debugger tool within the developer console.