JavaScript Calculator-

Hey all… This was a SUPER HARD project:

HTML/CSS was the most easy part as I have been coding HTML/CSS for about 2 years.

BUT I am still fairly new to JavaScript… about a total of 4 months of learning… I finished my JS cert… everything was easy to learn except I had the worst time solving algorithms… I would only get half the answer correct and would have to look at answers and work through it line by line, take it apart and put back together again…

As a JavaScript newbie… with a basic understanding of loops, data types, functions and methods, I still have a hard time making/writing up code to run a program. I remembered that I felt the same way about HTML and CSS when I first started… but I remembered what helped me the most…studying other peoples code, taking code line by line and research what it did and how it worked… looking at patterns… yes there are patterns in HTML layouts too depending on what CSS tools you plan to lay it with…

My JS calc looks good and it works… but to be honest… I had to study the code, take it apart and piece it together with my own HTML/CSS… I had 3 different calculator tutorials in which I took the code line by line and refactored to use on my own project… I learned A LOT! And I saw a pattern… all 3 tutorials had a very simluar pattern and process… 4-5 functions w/if statements, 2 variable objects to work from, events…no loops, etc…

I urge you please don’t get discouraged… study other peoples/tutorials code, look for patterns, look at many different resources, look up everything you don’t understand… the more you do this, the better you will get at JS, and I think algorithmins too.


When I click the link I can only see the calculator not any code?

it is hosted on github pages, so it is an online working version
it is not like codepen where you can also easily see the code

congratulations! awesome job!

and really thank you for the encouragement!

1 Like

you can use Chrome developer tools to look at the code through your browser…

yes thank but i am so used to codepen nowaydays XD

it’s scary somethimes that you seem to know how i think :3

thats a good start! but you will evently have to use Chrome Dev Tools, and GitHub for all your web projects… it good to start getting some practice with it…

It’s awesome…Good work…Great motivation​:ok_hand::ok_hand:

1 Like