oreodesign.blogg.se

Javascript chrome console calculator
Javascript chrome console calculator







This project took me about 4 hours before I told myself, “screw it” and finally looked at the solution.

javascript chrome console calculator

#Javascript chrome console calculator how to

It just adds a fixed value to the display input and then evaluates the strings that the input displays.Īnyway, I guess this is what learning how to be a programmer is all about. It doesn't even use and eventListener, per se. I actually ❤ the simplicity of this calculator. This project did, however, remind me how to use the JavaScript eval() function. The author of this application coded very similar functionality in way fewer lines than the author of the Apple Calculator. In other words, it seems the real part of being a programmer is THINKING about what has to occur in your application and then EXECUTING IT IN A LOGICAL MANNER, using all the tools that JavaScript gives you. The second thing I realized is being a JavaScript programmer who codes things from scratch is way more complicated than creating small applications. Like I said in the past, the first thing I realized is that something you could code just a few months ago will absolutely escape you when you're a beginner. The author of this project used some simple inline JavaScript and the JavaScript eval() function to make a working calculator. Not only did I not complete my own code, I didn't even get close to the solution in the Apple Calculator code.įurthermore, it turns out that I didn't even have to make my code as complex as I did in order to create a basic JavaScript calculator. Specifically, I tried to code it using many different functions, just like this JavaScript Apple Calculator. It is pretty much useless.įor whatever reason, I tried to code this project using previous knowledge of other calculators I've coded in the pass. When you go to my source code, you'll find my app.js file. I feel stupid, and you would too if you tried to code this project like me.

javascript chrome console calculator

This calculator adds, subtracts, multiplies, and divides. The objective of this project is to code a basic arithmetic JavaScript calculator. Share Hosted Project GitHub Source Files Project Objective







Javascript chrome console calculator