# Finished JavaScript calculator using React

**URL:** <https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849>\
**Category:** I Built This\
**Created:** [September 27, 2019, 6:49pm UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849 "2019-09-27T18:49:25Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![injashkin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/injashkin/32/105053_2.png) [@injashkin](https://forum.freecodecamp.org/u/injashkin)\
**Post date:** [September 27, 2019, 6:49pm UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/1 "2019-09-27T18:49:25Z")

</div>

Hi everyone. I finished my calculator. You can look at [codepen.io](https://codepen.io/injashkin/pen/KKPEbqG). I would appreciate anyone who will test and evaluate my work.

---

<div class="post-metadata">

**Author:** ![Code-Ex](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/code-ex/32/124932_2.png) [@Code-Ex](https://forum.freecodecamp.org/u/Code-Ex)\
**Post date:** [September 27, 2019, 7:47pm UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/2 "2019-09-27T19:47:42Z")

</div>

wow that’s awesome nice try i really like what you’ve done back there thumb’s up

---

<div class="post-metadata">

**Author:** ![LittleBlue](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@LittleBlue](https://forum.freecodecamp.org/u/LittleBlue)\
**Post date:** [September 27, 2019, 8:44pm UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/3 "2019-09-27T20:44:43Z")

</div>

Here you go then:  
injashkin your calculator:

I think its better if you change the color of the equal sine.  
When you make an account, the calculator shows the final value twice.  
About the division by 0 I say you the same thing that I said to stel: When you divide by 0 you can’t say is infinite, because currently its not defined if is infinite or other thing, so my advice is when you divide something by 0 put “Its not possible to divide by 0”.

---

<div class="post-metadata">

**Author:** ![injashkin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/injashkin/32/105053_2.png) [@injashkin](https://forum.freecodecamp.org/u/injashkin)\
**Post date:** [September 27, 2019, 9:01pm UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/4 "2019-09-27T21:01:18Z")

</div>

Thanks for feedback! I was doing a project functionally similar to the [https://codepen.io/freeCodeCamp/full/wgGVVX](https://codepen.io/freeCodeCamp/full/wgGVVX). There is also repeated twice the final value. As for zero, I agree, it needs to be changed. Although on the link the result is - infinity. I don’t bother with color. The main thing is functionality.

---

<div class="post-metadata">

**Author:** ![Steffan153](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/steffan153/32/119621_2.png) [@Steffan153](https://forum.freecodecamp.org/u/Steffan153)\
**Post date:** [September 28, 2019, 3:32am UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/5 "2019-09-28T03:32:24Z")

</div>

Nice job! 👍

- For mobile stuff, please go to pen settings -\> html -\> insert viewport meta tag -\> save & close.
- On the display with what you typed, IMO the background should be a bit lighter:  
 ![DeepinScreenshot_select-area_20190927212250](https://global.discourse-cdn.com/freecodecamp/original/3X/3/c/3c7d740b1a0a6141462ed7a661692120131da84b.png)  
🤔
- On the buttons, what about a different border? 😃 Maybe `1px solid white`?
- Great job! 🎉

---

<div class="post-metadata">

**Author:** ![injashkin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/injashkin/32/105053_2.png) [@injashkin](https://forum.freecodecamp.org/u/injashkin)\
**Post date:** [September 28, 2019, 7:33pm UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/6 "2019-09-28T19:33:33Z")

</div>

Thank You Steffan153.  
As far as I understand, I have to enter the following: `<meta name="viewport" content="width=device-width, initial-scale=1">`?.  
How about this background?  
 ![Screenshot_2019-09-28%20Javascript%20Calculator](https://global.discourse-cdn.com/freecodecamp/original/3X/8/e/8eebc556f742ff97d78b8f7f427d5cbd35381396.png)  
With the boundaries of the buttons I have not yet figured out, as they automatically sets Bootstrap. Can someone tell me?

---

<div class="post-metadata">

**Author:** ![ConnerOw1115](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/connerow1115/32/326955_2.png) [@ConnerOw1115](https://forum.freecodecamp.org/u/ConnerOw1115)\
**Post date:** [September 28, 2019, 7:42pm UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/7 "2019-09-28T19:42:58Z")

</div>

Wow! Impressive functionality and style!

I love how you space you calculator’s buttons. Your colors are really great, too.  
If you could put a green space at the top of the calculator’s screen to hide the previous step, that’d be great.

---

<div class="post-metadata">

**Author:** ![injashkin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/injashkin/32/105053_2.png) [@injashkin](https://forum.freecodecamp.org/u/injashkin)\
**Post date:** [September 28, 2019, 7:53pm UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/8 "2019-09-28T19:53:27Z")

</div>

Sorry, forgot to update the code. How now?

---

<div class="post-metadata">

**Author:** ![Steffan153](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/steffan153/32/119621_2.png) [@Steffan153](https://forum.freecodecamp.org/u/Steffan153)\
**Post date:** [September 28, 2019, 9:26pm UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/9 "2019-09-28T21:26:33Z")

</div>

> [@injashkin](#):
>
> As far as I understand, I have to enter the following: `<meta name="viewport" content="width=device-width, initial-scale=1">` ?.

Yes. 🙂

> [@injashkin](#):
>
> as they automatically sets Bootstrap.

Actually bootstrap does not set the button styles, since you didn’t use Bootstrap classes on it. Simply set `border: 1px solid white` on buttons.

> [@injashkin](#):
>
> How about this background?

Nice. 🕶

---

<div class="post-metadata">

**Author:** ![injashkin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/injashkin/32/105053_2.png) [@injashkin](https://forum.freecodecamp.org/u/injashkin)\
**Post date:** [September 29, 2019, 8:16am UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/10 "2019-09-29T08:16:38Z")

</div>

> [@Steffan153](#):
>
> On the buttons, what about a different border? 😃 Maybe `1px solid white` ?

When I do so, disappears the effect of pressing.

---

<div class="post-metadata">

**Author:** ![injashkin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/injashkin/32/105053_2.png) [@injashkin](https://forum.freecodecamp.org/u/injashkin)\
**Post date:** [September 29, 2019, 12:41pm UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/11 "2019-09-29T12:41:08Z")

</div>

Anyone tell me why on the website [http://projects.jinv.ru/projects/calculator/index.html](http://projects.jinv.ru/projects/calculator/index.html) this calculator has large numbers and buttons  
 ![Screenshot_2019-09-29%20Javascript%20Calculator](https://global.discourse-cdn.com/freecodecamp/original/3X/4/4/445a03eae94415becaf4079bb5caf207ceddf554.png)  
and here [codepen.io](https://codepen.io/injashkin/pen/KKPEbqG) labels on buttons small  
 ![Screenshot_2019-09-29%20JavaScript%20Calculator(1)](https://global.discourse-cdn.com/freecodecamp/original/3X/4/b/4b232666b70570d6f0b44e7324b719a65f03aa89.png).

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [February 6, 2021, 1:29pm UTC](https://forum.freecodecamp.org/t/finished-javascript-calculator-using-react/317849/12 "2021-02-06T13:29:44Z")

</div>

Closed on February 6, 2021, 1:29pm UTC


