TechSpiritSS / Terminal-Portfolio

Terminal Style Portfolio made with HTML / CSS / JS
MIT License
62 stars 82 forks source link

Adding the Calculator functionality #34

Closed KanishkDadhich closed 1 year ago

KanishkDadhich commented 1 year ago

Hey @TechSpiritSS . I've tried adding a calculator functionality to it. Note :- It can only perform operation on 2 numbers at a time. It will take 2 numbers as input and then ask which type of operation to be performed. It can perform operations such as addition, subtraction, subtraction, division, multiplication, modulo, AND, OR on the two given numbers.

I hope it helps. P.S :- Please go thoroughly through the script.js file because I've made significant changes in it.

Thanks :)

TechSpiritSS commented 1 year ago

Sure mate go for it đź‘Ť

KanishkDadhich commented 1 year ago

Hey @TechSpiritSS . I've made a calculator for this terminal. But I'm not able to create the pull request. This message is being showed "Can’t automatically merge. Don’t worry, you can still create the pull request". And also I've done significant changes in your code. And I'm sure that it may conflict with other commits. Hence I would like to request you to please create a NEW BRANCH and then I'll make a pull request to that branch , if you are comfortable with it. Because I've done significant enough changes to it, and I don't want you to get confused in your project due to the changes made by me.

Also If you want to see the calculator, Here's the link to my forked repo and please go through it thoroughly. Also if you want I can also make a video of it. https://github.com/KanishkDadhich/Terminal-Portfolio

Thanks: :)

TechSpiritSS commented 1 year ago

@KanishkDadhich , I saw that file and there are lots of changes in that, What I'll suggest you is that create a new JS file for your calculator as your repo is 38 commits behind the main repo and it will be difficult for all of us to keep up with that many changes in a single file. Having a separate JS file for calculator seems a much better option to me, I hope you agree to this too. BTW do deploy your project on github pages so that I can check it live in action as well.

KanishkDadhich commented 1 year ago

Sure. I'll look into this

BhagatHarsh commented 1 year ago

Hey @TechSpiritSS I would like to try Implement this feature. Im thinking Ill use the inbuild Javascript Eval() function instead of the method @KanishkDadhich used.

TechSpiritSS commented 1 year ago

Sure go for it 🚀 but create a seperate JS file as main file is getting a little messy now.