Thank you for visiting,
With this code above i can only change the numbers in my VScode lol , no random numbers but the symbols(+,-,/,*) worked which i was excited for. See the result below
Funny yeah , However after watching so many youtube videos like you , i stumbled on the below calculator and decided to replicate it because it looked way better than what i had done in the past and i created the below and i felt fulfilled and asked for an extra caoffee at the cafe i was practicing this.
The difference between the first and second was CONDITIONAL STATEMENTS
Use if to specify a block of code to be executed, if a specified condition is true
Use else to specify a block of code to be executed, if the same condition is false
Use else if to specify a new condition to test, if the first condition is false.
Viola !! the result below. Practice make perfect
Lastly, you can switch from light to dark mode. I prefer Dark mode for all my Apps .
Thank you very much for your attention!!!