Lab 18 Reflection

Brian Sherpa
4/4/19
JS Arithmetic Operators


Lab 18 consisted of working with arithmetic operators, similar to how a calculator functions. For this section of the Calculator Movement, I remade a webpage into a calculator that would calculate the arithmetic operators with two users inputted values using addition, subtraction, multiplication, and division. Basically how this function is that a user inputs two values, one for the first number and one for the second number. After this, they can click either of the buttons that run functions to calculate the numbers. For example, if you input the numbers 1 and 2 then click the add button, the result at the bottom will display 3. If you subtract the numbers, you get -1. If you multiply the numbers, you get 2. When you divide them, you get .5. Lastly, when you modulo them you get 1. This works with all numbers and works by storing both values as variables, calculating it and then displaying the result at the bottom. These skills would be useful to a web designer because it would allow them to fundamentally understand how arithmetic operators work and function. It also gives them insight about how numbers and math, in general, can be worked with in JavaScript and gives us the flexibility to use it in our programs.

Comments

Popular posts from this blog

Mock Interview

HW What do FileZilla, CoreFTP & CyberDuck have in common?

Soft Skills--Networking