Please sign in to access this page

calculator

calculator Used AI

9 devlogs
13h 35m
Created by xkboo

Using HTML, CSS, and Javascript, I created a fully functional calculator that does PEMDAS and decimals with error checking.

Timeline

Ship 1

0 payouts of shell 0 shells

xkboo

about 1 month ago

xkboo Covers 9 devlogs and 13h 35m

UI has been refined. Error checking should work - previous parenthesis problem is solved. Decimals are now valid. I think I am finishing up this project!

Added basic html and css, still need to format and make it connect to the javascript. There is a bug where if there is two parenthesis next to eachother it will break. for example (2-2)(3+3). Will need to work on that.

I am struggling on centering the entire calculator... im not tooooo familiar with flexbox and whatnot and will need to look into that

added couple more error test cases to ensure program runs smoothly, tried to set up user input not sure how

program now checks if the inputted equation is valid/invalid. added comments to everything

i think i solved the negative signs issue! basically my program is checking the number before and after an operator however if there is a negative sign it wont register that its a number so it screws up the system. I solved this by checking if there is no next number i will just add the next operator (a negative sign)!

next step: making sure user is giving valid inputs

Got parenthesis kind of working, fixed the previous issue where the new equation wasn't showing (this was due to the string not being properly set to a number). Need to work on negative numbers next since that's still a little buggy. In the video i think I said brackets - i meant parenthesis.

currently at a roadblock with my parenthesis function, not sure why it isn't working!

created an array of operators that are ordered with pemdas
the function will run through each of these operators and simplify the original equation until all operators are used
need to work on parenthesis

setting up JS, doing adding and subtracting