ByteBiteChef / ByteBiteChef.github.io

0 stars 0 forks source link

Build a Basic Calculator ๐Ÿงฎ #2

Closed nunyvega closed 7 months ago

nunyvega commented 12 months ago

Objective

Max, letโ€™s build a basic calculator that can handle addition, subtraction, multiplication, and division. We'll break this down into baby steps so it's easier to tackle. Aim to complete one step at a time, and feel free to ask questions anytime.

This is how it should look: image

Task Breakdown

Step 1: Setup HTML Structure ๐Ÿ—
Step 2: Link a JavaScript File ๐Ÿ–‡
Step 3: Create Basic Arithmetic Functions โž•โž–โœ–โž—
Step 4: Collecting User Inputs ๐Ÿ“ฅ
Step 5: Connecting Buttons to Functions ๐Ÿ–ฑ
Step 6: Displaying Results ๐Ÿ–ฅ
Step 7: Testing and Debugging ๐Ÿž

Notes ๐Ÿ“

Happy coding ๐Ÿš€

ByteBiteChef commented 12 months ago

Thanks, I'm gonna get this done today!

ByteBiteChef commented 12 months ago

The first three tasks were completed here: https://github.com/ByteBiteChef/ByteBiteChef.github.io/commit/8cbb38d52b0d42398a8b2f6303f5731a08ede310

nunyvega commented 12 months ago

Nice! I can see it's already live at: https://bytebitechef.github.io/Calculator/calculator.html

ByteBiteChef commented 12 months ago

Step two is completed!

nunyvega commented 12 months ago

Looks good! I can see the results being logged to the console.

For one of your next steps, we did not discuss this too much, but you need something like:

// Add result to your div
document.howeverYouSelect('selector').innerHTML = calcResult
ByteBiteChef commented 12 months ago

Well, I just finished my first calculator program! I tested the code and everything looks great, thanks for the challenge!

You can check it out on the link below: https://bytebitechef.github.io/Calculator/calculator.html

nunyvega commented 12 months ago

Maravilloso! Fantastic job on completing your first calculator program ๐Ÿš€

About your comment:

You can check it out on the link below: http://127.0.0.1:5500/Calculator/calculator.html

I noticed that the link youโ€™ve provided is a local address (http://127.0.0.1:5500/Calculator/calculator.html). This address points to a server running on your own computer, which means that only you can access it from your machine. Itโ€™s like having a private stage where you can rehearse and see everything in action before the actual performance.

For sharing your creation with me, or anyone else, youโ€™ll want to use the live website link where your project is hosted. Your project is actually live and accessible to the world at bytebitechef.github.io. This is the public stage where everyone can see and appreciate your performance once you push your code โฌ†๏ธ

Let's take this moment as an opportunity to add the calculator to the menu of your website. Please complete this task before we mark this project as done:

ByteBiteChef commented 12 months ago

Thanks, I just put the right link in the comment.

Also, I added the calculator to the menu of my website.

Cheers!

nunyvega commented 12 months ago

Sounds good! We can now move on to the next task, a TODO list: Your second project - A TODO list ๐Ÿ—’๏ธ

As a note, normally. when an issue is resolved/completed (like this one), you close it with this button: image

Feel free to do so!