Build A Simple Calculator With JavaScript | Mini Project For Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ก.ย. 2024

ความคิดเห็น • 75

  • @webcifar
    @webcifar  3 ปีที่แล้ว +2

    🔔subscribe and turn on the notification bell.
    👉 source code: codepen.io/Web_Cifar/pen/XWdVgXr
    👉 #30days30submits : github.com/ShaifArfan/30days30submits

  • @stevevang506
    @stevevang506 3 ปีที่แล้ว +11

    The BEST JS calculator tutorial on the web. hands down.

  • @nikhilraj4098
    @nikhilraj4098 3 ปีที่แล้ว +6

    Hands down the best calculator on vanilla JavaScript period.
    Every one uses eval function and you hard coded the logic, and you added so much functionality and all this is 1 hour,
    Please make such good projects more that help us in learning how to form logic.
    This video is under-rated

  • @rubaiyabegum1722
    @rubaiyabegum1722 2 ปีที่แล้ว +3

    got this project done without any suffering....Jazakallah khair

  • @soldishero_YY
    @soldishero_YY ปีที่แล้ว +1

    Thanks. A little confused with numbs and elements but helpful tutorial!

  • @Ace718215
    @Ace718215 3 ปีที่แล้ว +6

    Awesome tutorial brother best js calc tutorial ive seen. keep up the great work

  • @speedbump164
    @speedbump164 2 ปีที่แล้ว +1

    this was an amazing tutorial. the design and code itself are great. this is exactly what i needed to troubleshoot my own calculator app. you definitely earned a thumbs up and a sub. thank you so much

  • @charlesjoma536
    @charlesjoma536 2 ปีที่แล้ว +1

    Awesome Tutorial, keep them coming, awesome how you walked through the reasoning for everything!!
    Helped me Alot
    Thank you

  • @blackwidow4real
    @blackwidow4real 2 ปีที่แล้ว +1

    Thank you kindly sir, you are explaining it very well and it was fun to follow along and make this calculator with you

  • @elexafm
    @elexafm 3 ปีที่แล้ว +4

    thank you so much for this video. you explained sooo well the logic that i was able to make some changes for my own calculator project. like subscribe and share for this gentleman

  • @barryowino1485
    @barryowino1485 2 ปีที่แล้ว

    The best calculator built with vanilla JS...keep it up

  • @MuhammadAdnan2.0
    @MuhammadAdnan2.0 3 ปีที่แล้ว +1

    great history feature still watching ,,,,,,,, unique really :D validation as well

    • @webcifar
      @webcifar  3 ปีที่แล้ว +1

      Thank You ✌

  • @MaximilienBrunet
    @MaximilienBrunet ปีที่แล้ว

    Great! Thank you very much! 🙏🙏🙏

  • @riajmahmud4303
    @riajmahmud4303 ปีที่แล้ว

    This is the best calculator titurial

  • @sonalkumari4325
    @sonalkumari4325 2 ปีที่แล้ว +1

    please make video over operator change logic....which we see in the real calculator
    (for example -> we press (*) by mistake, then we change the operator after clicking on the another one)

  • @chisomannastesia982
    @chisomannastesia982 2 ปีที่แล้ว

    tank you for this awesome guide. its so beginner friendly

  • @kenethnjoroge5313
    @kenethnjoroge5313 3 ปีที่แล้ว

    If not for anything, you winned me over as a subscriber coz of this video... Thank you for the great work🔥!

  • @dgross4735
    @dgross4735 ปีที่แล้ว

    Excellent work. One question, What would need to be done to change the color of a key or row of keys like at the top to be a different color than the number set below...?

  • @TioYoh
    @TioYoh 2 ปีที่แล้ว

    Thank you for the class! I learned a lot!

  • @Alan-ox2hp
    @Alan-ox2hp 3 ปีที่แล้ว

    Good video, thanks. Good to learn from different sources. many thanks

  • @istiakahammad7074
    @istiakahammad7074 3 ปีที่แล้ว +2

    Thanks for this video

    • @webcifar
      @webcifar  3 ปีที่แล้ว

      Most welcome

  • @samarjamil3053
    @samarjamil3053 3 ปีที่แล้ว +1

    Great job 👌

    • @webcifar
      @webcifar  3 ปีที่แล้ว

      Thank you

  • @rohanshoaib1475
    @rohanshoaib1475 3 ปีที่แล้ว

    Great Job man!!

  • @shoeb_akter
    @shoeb_akter 3 ปีที่แล้ว +1

    You are AWSOME🔥

    • @webcifar
      @webcifar  3 ปีที่แล้ว

      Thanks Brother ♥

  • @Harrison2
    @Harrison2 3 ปีที่แล้ว

    dope...going to start on an earlier video

    • @webcifar
      @webcifar  3 ปีที่แล้ว

      Go for it!

  • @onyinyechukwuma4272
    @onyinyechukwuma4272 2 ปีที่แล้ว

    This was so helpful. thanks

  • @jayeshbansod8515
    @jayeshbansod8515 3 ปีที่แล้ว +1

    Uncaught typeError : numbersE1.forEach is not a function at......... Sir sir why it is happening and what do it for this error. Please tell me

    • @fittingprize8135
      @fittingprize8135 3 ปีที่แล้ว

      same here, do u find the solution ?

    • @mateuszmichalski6747
      @mateuszmichalski6747 2 ปีที่แล้ว

      check if you have const numbersEl = document.querySelectorAll(''number'). At first I also had this error but I noticed that I have const set with just .querySelector (without 'All' at the end)

  • @ЛюдмилаЖерко
    @ЛюдмилаЖерко 3 ปีที่แล้ว +2

    There is a small bug . if second operand is empty and has "." value and when you press equal button the result says NaN. Nevertheless great tutorial

    • @webcifar
      @webcifar  3 ปีที่แล้ว +1

      Thanks for mentioning it.

  • @istiakahammad7074
    @istiakahammad7074 3 ปีที่แล้ว +3

    Can you make a sciencetific calculator?

    • @webcifar
      @webcifar  3 ปีที่แล้ว

      I can try

  • @sprahzyend7535
    @sprahzyend7535 3 ปีที่แล้ว

    Good tutorial!

  • @jassrajput890
    @jassrajput890 3 ปีที่แล้ว

    awesome

  • @supplymeweed
    @supplymeweed 2 ปีที่แล้ว

    At line 24 you called mathOperation function()...but you not defined it...how it worked...because when i'm calling that function...it shows error...kindly clear my doubt

  • @taslucian
    @taslucian ปีที่แล้ว

    I like this code. It is verry clean and verry clear, but the calculator is not doing the calculations in the correct order. This is happening because of the temporary result. One example is: 2+3*2 . The result should be 8, but the calculator give the result 10 witch is not correct. How can we fix this?

  • @MuhammadAdnan2.0
    @MuhammadAdnan2.0 3 ปีที่แล้ว

    Day 29 portfolio something like this. www.templateshub.net/demo/?theme=robert-personal-onepage-html-template

  • @basseyjennifer5601
    @basseyjennifer5601 3 ปีที่แล้ว

    thank you

    • @webcifar
      @webcifar  3 ปีที่แล้ว

      You're welcome

  • @madhavsewag4804
    @madhavsewag4804 2 ปีที่แล้ว

    How can I do continue calculation with = operator

  • @eelguneezmemmedov1671
    @eelguneezmemmedov1671 3 ปีที่แล้ว +1

    What u say and write i understand clearly but when i start to code by myself i stuck ((( Could u say why ? how u became to this level ?

    • @webcifar
      @webcifar  3 ปีที่แล้ว

      It happens with everybody. You need to keep trying.

    • @eelguneezmemmedov1671
      @eelguneezmemmedov1671 3 ปีที่แล้ว

      @@webcifar Thanks for feedback i will do my best!

  • @alijaafar4055
    @alijaafar4055 2 ปีที่แล้ว

    forEach loop is giving me an error, why

  • @devShahriar
    @devShahriar 3 ปีที่แล้ว +1

    You need to work more on logic brother , keep it up

    • @webcifar
      @webcifar  3 ปีที่แล้ว

      Thank you

  • @techwithoge6899
    @techwithoge6899 3 ปีที่แล้ว

    This is so nice, made something similar to this ya'll can check it out

  • @lerdrobott549
    @lerdrobott549 3 ปีที่แล้ว

    This code doesnt follow MDAS

  • @ce7083
    @ce7083 3 ปีที่แล้ว

    Dude, I was follow every step on this video tutorial but my calculator doesn't want to click (unclickable) - What the heck is going on? how I can connect with you? How do I know if you or someone replying this my message in youtube?

    • @ce7083
      @ce7083 3 ปีที่แล้ว

      Its only the UI that's work, in my code.. pls some help?

    • @webcifar
      @webcifar  3 ปีที่แล้ว +1

      Check the click eventlistener. If you are still facing the problem just join the facebook group and there you will find me.

    • @ce7083
      @ce7083 3 ปีที่แล้ว

      @@webcifar Thanks a lot for replying my message dude I really appreciate it, for now I don't have FB account I'll make it & finding you (on it) later..

    • @manjupriyakarthikeyan
      @manjupriyakarthikeyan 3 ปีที่แล้ว

      @@ce7083 same problem for me (unclickable.).if you find a solution for that .help me

    • @tehannasmall2316
      @tehannasmall2316 3 ปีที่แล้ว

      @@ce7083 hi, did you get the buttons to become clickable?? I don't have Facebook to connect with you

  • @ahadamin7361
    @ahadamin7361 2 ปีที่แล้ว

    31:33

  • @raquels6354
    @raquels6354 2 ปีที่แล้ว +1

    this tutorial is great but the tutor doesn't explain well. he gets confused many times and can't explain in words cleary what he is doing and why.

    • @webcifar
      @webcifar  2 ปีที่แล้ว

      Thanks for your feedback.

  • @rubelbarua9953
    @rubelbarua9953 2 ปีที่แล้ว

    Too much code

  • @СахидамСадирова
    @СахидамСадирова 2 ปีที่แล้ว

    Ьл

  • @bineethl2666
    @bineethl2666 3 ปีที่แล้ว +2

    Kindly clear how can we connect the haveDot to e.target.innertext in this condition -- if (e.target.innertext==='.' &&!have dot)
    havaDot=true;

    • @webcifar
      @webcifar  3 ปีที่แล้ว

      if we are clicking do (e.target.innertext) and we don't have a dot yet in out number then add the dot also make have Dot true.

    • @bineethl2666
      @bineethl2666 3 ปีที่แล้ว

      Hello sir,
      I convinced with your point thx a lot but my query is how this condition will understand by calculator if( e.target.innertext == '.'(convinced) &&!haveDot (this condition not convinced mean how calculator will know that we dont have dot previously in a number by this condition because we dont mention anywhere haveDot is equal to '.' And We simply considered haveDot is boolean as false ) )
      Kindly explain please!!!

    • @webcifar
      @webcifar  3 ปีที่แล้ว +1

      @@bineethl2666 Initially the haveDot value is false but when we are clicking the dot if you can see we are changing the value of haveDot to true. Now it means we have the dot inside the number. After that you can't add another dot in the same number because the haveDot is now true. and when we are adding a new number, if you notice we are again changing the havDat value to false so that user can add dot to the new number.

    • @bineethl2666
      @bineethl2666 3 ปีที่แล้ว

      @@webcifar thnks a lot 👍

    • @bineethl2666
      @bineethl2666 3 ปีที่แล้ว

      Why we have given haveDot value is false ; we can give it true also and apply condition vice versa;