how to build a simple calculator using javascript

Sdílet
Vložit
  • čas přidán 24. 06. 2021
  • This is a simple calculator tutorial using HTML, CSS and Javascript. The logic is very simple with the minimum lines of code possible. This is a step by step tutorial for beginners. Including a simple design and logic that's easy to follow.
    Learn how to create Student Management System : • Student Management sys...
    how to build a simple calculator using javascript
    Build COVID-19 Application: • Build a COVID-19 Track...
    Build weather Application: • 5-Days Weather Applica...
    Animated Text: • CSS Text Typing Animat...
    JS console Methods: • Top useful JavaScript ...
    Javascript Real-time- Projects: • JavaScript Real-Time P...
    HTML CSS projects : • HTML and CSS Projects
    JavaScript full: • JavaScript Tutorial fo...
    Java Tutorial: • Core Java
    C++ Tutorial : • C++ Tutorials
    JavaScript Array Methods: • Complete Array Methods...
    #calculator
    #javascript
    #html
    #css
    #responsivewebsite

Komentáře • 220

  • @RanjanBeginnersGuide
    @RanjanBeginnersGuide  Před 9 měsíci

    Learn how to create Student Management System : czcams.com/video/-3W7t1Uh0vk/video.html

  • @sandrachiamaka
    @sandrachiamaka Před rokem +5

    Honestly speaking, this is the most interactive course I’ve had in a long time. It simplified these functions and I found myself responding and understanding all of it.
    I’m definitely sharing this to my frienfs

  • @stephenbernard503
    @stephenbernard503 Před rokem

    This is the best and the most simplified calculate video I’ve ever watched. I’ve subscribed to your channel because of this video. Very good work

  • @tapan...
    @tapan... Před rokem +3

    It is easier than other tutorials out there! This tutorial was a great help 👍
    Thanks

  • @timtech9361
    @timtech9361 Před 2 lety +1

    That eval method literally saves you 50+ lines of code. Insane.

  • @koicel
    @koicel Před rokem

    What the heck!? Probably the best calculator guide out there. simple and working.

  • @innocentbyiringiro7698

    What an easy vid! I totally get it now sir. Thanks.

  • @subratkarmacharya8125
    @subratkarmacharya8125 Před 10 měsíci

    god level video bro.. i got 0 error for the first time in a while while doing project from youtube.. your one is clear af thank you

  • @funskate8850
    @funskate8850 Před rokem +1

    Everyone on the internet teaches JavaScript,but your content delivery is up to the point.Great Work.

  • @elizabetemichelledefreitas4941

    Thank you so much!!! This was brilliant and simple!!! It actually helped me to understand clearly. Can't wait to watch your next tutorial.

  • @adventcoder_videopro
    @adventcoder_videopro Před 2 lety +1

    BRO I KNOW IM LATE BY A YEAR, BUT YOUR EXPLAINATION IS THE BEST SO FAR...KEEP DOING THESE TUTORIALS YOU'RE REALLY A BLESSING TO HUMANITY..

  • @upendran9744
    @upendran9744 Před 3 lety +1

    Thanks for sharing the awesome content Ranjan.. keep up the good work 👍

  • @alphakurd8850
    @alphakurd8850 Před 2 lety +2

    The way you explain to us is amazing ❤ what a guy ... pls keep share tutorials for beginners 👏🏼👏🏼

  • @Iamnoone56
    @Iamnoone56 Před 2 lety

    thanks a lot done with the project learned a lot !

  • @njokuochafrancis3688
    @njokuochafrancis3688 Před 10 měsíci +2

    You are really a good teacher, I really understood some concepts of JavaScript through this video unlike other tutorials where codes are written fast without clear explanation, more grace ahead sir!.

  • @ibntofajjal
    @ibntofajjal Před 2 lety +1

    I never thought it would be so easy. Thanks Man😘

  • @matthiasmatanda4295
    @matthiasmatanda4295 Před 2 lety

    This was nice my friend, you made it very simple than going a long way, keep it up!

  • @atinukeadeshola-manuels9364
    @atinukeadeshola-manuels9364 Před 11 měsíci +1

    Beautifully explained video. Thank you for keeping it simple. Good job

  • @lochansingoria4430
    @lochansingoria4430 Před rokem

    Thank you thank you so much😭
    I was not getting the right video to understand each and every command and here's the easiest explanation ever
    Keep making more videos please we need a mentor like you

  • @mr_rey000
    @mr_rey000 Před 2 lety

    its so easy and wonderfull thank u soo much youtuber

  • @ezehchika289
    @ezehchika289 Před 2 lety

    Brillant way! Very well understood. You made it so easy...thanks

  • @vicentegarcia9562
    @vicentegarcia9562 Před 2 lety

    You are amazing bro!! so clear so good man you deserve a price!

  • @mydogisblind8403
    @mydogisblind8403 Před 2 lety

    Very nice video, you explain everything as much as needed!

  • @Deepak-ex2bv
    @Deepak-ex2bv Před rokem +1

    What a awesome way of making such a marvelous calculator!
    It helped me a lot,
    Thank you 🙂🙂

  • @TechNDev
    @TechNDev Před rokem

    finest calculator I have seen so far!

  • @Eudinhow
    @Eudinhow Před 2 lety

    Amazing, thank you very much!

  • @anshaaisha2477
    @anshaaisha2477 Před 2 lety

    Thanks for the simple explanations.

  • @lifeinafrica3667
    @lifeinafrica3667 Před 2 lety

    This is awesome. Keep doing it man😍👍

  • @IamPetrus
    @IamPetrus Před rokem

    Gracias! Greetings from Spain

  • @ashantileigh2520
    @ashantileigh2520 Před 6 měsíci

    Your tutorial really made me more confident

  • @prathamakhartade9327
    @prathamakhartade9327 Před rokem

    thank you so much sir!!!!

  • @ronilynabril5170
    @ronilynabril5170 Před 3 lety +1

    Thank you for sharing, it is very understandable.

  • @osamugaming1807
    @osamugaming1807 Před rokem

    thanks dude, I really like your content you explain every details compare to other tutorial yours is much easier.

  • @utkarshabhole2506
    @utkarshabhole2506 Před rokem

    Thank you so much !! help me to understand clearly...explanation is very simple and understandable....Thank you so much

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před rokem

      You are welcome!...Watch the Simplified version here czcams.com/video/1D619pLbRro/video.html

  • @nikolayminkov364
    @nikolayminkov364 Před 2 lety

    That is brilliant &
    Fantastic presentation
    Thank you very much

  • @riyazkaleem258
    @riyazkaleem258 Před 2 lety

    easy to understand and helpful, please make more videos like this.

  • @priyadharshinimuthukumar8970

    thank you so much sir...it helps me to understand the logic

  • @ngeneprecious1977
    @ngeneprecious1977 Před 2 lety

    Thank you!!!!!!!!!

  • @jonathanchipande3981
    @jonathanchipande3981 Před 3 lety

    Awesome tutorial

  • @navenrajah6030
    @navenrajah6030 Před 2 lety

    On point with explanations.

  • @MounikaUmmidi
    @MounikaUmmidi Před rokem

    Thank you so much !!!

  • @originaldammy32
    @originaldammy32 Před 6 měsíci

    One of the best tutorials I've watched so far, the fact he says "I hope you understand" after a few steps shows that he really wants us to understand what the code actually does... I learnt a lot and followed along, my calculator works too... It's kinda like my first ever finished project

  • @user-oc6jk4gc1s
    @user-oc6jk4gc1s Před rokem

    Wooooow you are a true teacher,, I am now a calculator developer................keep it up bro

  • @petarpetrov5964
    @petarpetrov5964 Před 2 lety +1

    Thank you men you are my teacher

  • @hafizehtisham7534
    @hafizehtisham7534 Před rokem

    Hello buddy ... It's just an awesome tutorial furr developing a basic calculator on you tube... I learned each n everything so clearly n Yuh explained everything so cleanely... Thnkew so much ...keep blossoming dude!

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před rokem

      Thank you so much dude..i really appreciate it..keep watching my videos and share them with your loved ones who are in need of these types of videos.

  • @asimiyuabdulmalik5269
    @asimiyuabdulmalik5269 Před 9 měsíci

    😢explanation is thr best I'll surely subscribe and i hope this video reaches more people honestly..

  • @Alan-ox2hp
    @Alan-ox2hp Před 3 lety

    nice one, thanks

  • @madrinsx8770
    @madrinsx8770 Před 2 lety

    Dude ..ur the best 👌 u just made a difficult task easy .. subscribed 🥳

  • @webphame
    @webphame Před 10 měsíci

    Amazing! thanks

  • @uzeetv7767
    @uzeetv7767 Před rokem

    You deserve more subscribers!! You finally taught me how to make calculator. Bro, please also teach with Classes and without eval.

  • @user-cy9cr1fr3k
    @user-cy9cr1fr3k Před 10 měsíci

    thank you sir !your explanation is very nice to understand🤗

  • @tamilcinemanews4281
    @tamilcinemanews4281 Před rokem

    Wonderful explanation 🎉

  • @eshw23
    @eshw23 Před 2 lety

    Normally other tutorials have 100 lines of Js code for calculators thank you alot.

  • @burgersteak_
    @burgersteak_ Před rokem

    Thank you for this tutorial it really helps me a lottt :)

  • @nothing-ct6dn
    @nothing-ct6dn Před rokem

    Thank it's really easy to understand ☺️

  • @dcjibo
    @dcjibo Před rokem

    A very good video. Very clear explanations. This is just great. Do you have any other videos you have made?

  • @sparsh-0384
    @sparsh-0384 Před rokem

    simple and well explained 👍

  • @nirajmurmu2908
    @nirajmurmu2908 Před 2 lety

    Great sir,
    I've learn many things thanks

  • @PreetiSharma-fu2ni
    @PreetiSharma-fu2ni Před 2 lety

    Good, thankq so much👍👍

  • @ehtishamnaveed1639
    @ehtishamnaveed1639 Před rokem

    what else can i do instead of writing 'onclink=calclulate()' on every single button ?
    How can i make calculate as a reusable component?

  • @wajahatkvlogs4869
    @wajahatkvlogs4869 Před rokem

    zabardast tutorial

  • @dominiquenelson8733
    @dominiquenelson8733 Před rokem

    What was that quick hack you did and 14:55 when you added onclick to all the buttons simultaneously?

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před rokem

      Kindly pause and watch the video carefully...there is no hack by the way . 😂

  • @aditya__exe
    @aditya__exe Před 2 lety

    Well, I don't know about Javascript, but do appreciate the UI👏👏👏

  • @hindrikounpuu147
    @hindrikounpuu147 Před 2 lety

    Great video

  • @alulaesayas2368
    @alulaesayas2368 Před rokem

    You the best

  • @csherms289
    @csherms289 Před rokem +1

    Man, awesome explanations for everything. One question though, isn't it generally considered bad practice to use eval? I heard that it can leave your code open to hackers to mess with your website if you use it.

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před rokem +1

      Thank you ☺️.. yes it is a bad practice to use eval..I used it for the tutorial purposes

  • @muhammad.hameem
    @muhammad.hameem Před rokem

    There should be code which should not allow two operations written consecutively

  • @aqibahmad1536
    @aqibahmad1536 Před rokem

    excellent 👍👍👍👍👍👍 super

  • @kirtidesai6456
    @kirtidesai6456 Před rokem

    thank you sirrrr

  • @gichuhisamuel4387
    @gichuhisamuel4387 Před 7 měsíci +1

    Bless up ❤❤ I wish you were my teacher,sir do you have online classes please

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před 7 měsíci

      I greatly appreciate your gesture.. please watch my playlist for different programming languages and let me know if you need any private lessons on a affordable price

  • @RanjitSingh-bm7rn
    @RanjitSingh-bm7rn Před 2 lety

    Can you teach offline of js?

  • @hezronkiprop2391
    @hezronkiprop2391 Před 2 lety

    Awesome

  • @onpoint755
    @onpoint755 Před rokem +1

    Sir plz make more projects like resume portfolio

  • @user-qe8xn2zo7u
    @user-qe8xn2zo7u Před 2 lety +1

    thx

  • @dhanishali5807
    @dhanishali5807 Před rokem

    Thank you it helped a lot.. but i think you missed to prgram "%" .. can you please explain how to do that?

  • @UjjwalGamed
    @UjjwalGamed Před 11 měsíci

    sir bina eval function k kaise krenge

  • @prabinhudeomaharjan
    @prabinhudeomaharjan Před rokem

    it was really simple and easy to understand
    unfortunately, i was unable to use the "%" calculation

  • @dkaileyeditz303
    @dkaileyeditz303 Před 2 lety

    Hello Sir,What software do you use for coding?
    Can I install in mobile.

  • @jaimebee4752
    @jaimebee4752 Před rokem

    Hello thank you soo much for the interactive course everything works except for the % please can you help me?

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před rokem

      Hi there..I'm glad you liked it..did you follow every steps? Kindly go through the code once again..or kindly check my pinned comment there is another tutorial on the same

  • @festuschibuzor7405
    @festuschibuzor7405 Před 2 lety

    great work but you forgot to give abox shadow to the div hoilding the button

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před 2 lety

      Thank you.... sorry for that

    • @festuschibuzor7405
      @festuschibuzor7405 Před 2 lety

      @@RanjanBeginnersGuide so please can you send the css of how to make the full calculator stand out like the one you're using as a reference in the video because the one made in the video and the one you're using as a reference are not all the same just a little difference. Please check. I put box shadow in the container css but it did not work

  • @kpujarao3601
    @kpujarao3601 Před rokem

    19:46 when I'm trying to click on any number it's not working anybody pls help me wt to do

  • @tina-ct4kf
    @tina-ct4kf Před rokem

    how would I calculate with the percent button? it doesn't do anything in my calculator when I click on the equal button :(

    • @albaqobe
      @albaqobe Před rokem

      I just had the same problem. instead of using calculate function on % button I made another function he is my solution:
      let percentage = ()=>{
      result.value=result.value/100;
      }

    • @albaqobe
      @albaqobe Před rokem

      and on the button:
      onclick = "perccentage()"

    • @albaqobe
      @albaqobe Před rokem

      that should fix it

  • @rajramani4691
    @rajramani4691 Před 2 lety

    add to cart system make tutorial please

  • @P00ters1
    @P00ters1 Před 2 lety

    i heard(from the course i am taking) its bad to use the eval() function. why is it so bad? they told me dont worry about it and dont use it for now and theyll explain more later in the course.

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před 2 lety +1

      Yes it's not a best practice to use eval method.. if you want to know the reason please read the following documentation
      developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval

  • @tincythomas4329
    @tincythomas4329 Před rokem

    Sir How to clear screen automatically when we press another button after getting answer?

  • @yogeshwaran809
    @yogeshwaran809 Před rokem

    When I use getElementsByClassName instead of Id it does not work why...

  • @justnbody.5934
    @justnbody.5934 Před 2 lety

    Can i know the name of this vscode theme ?

  • @perfectionchizuruoke6207

    I heard eval is not a good option for beginners..I’m curious tho

  • @onpoint755
    @onpoint755 Před rokem +2

    Sir Result arrow function is empty how he return +_*/🙄

  • @ayshafarhana4103
    @ayshafarhana4103 Před 2 lety

    Hai, for me the digits are not works when clicking could you suggest me the reason

  • @lovelycat4951
    @lovelycat4951 Před rokem

    nice explain but in javascript eval is dangerous.

  • @RanjanBeginnersGuide

    Hello Guys, I have recently simplified this Calculator Application: You can check the video in the link below"
    czcams.com/video/1D619pLbRro/video.html
    Keep supporting me as you always do. please Like, Share, and subscribe to the channel

  • @arkgaming6970
    @arkgaming6970 Před 2 lety +1

    Bro kiya source code nahi de skte ho kiya 😀

  • @onpoint755
    @onpoint755 Před rokem +2

    Help me sir plz 🥺😩

  • @lishaczek1727
    @lishaczek1727 Před 2 lety

    I mean… idk why, but I can´t make the = button take the two spaces. Strange

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před 2 lety

      Kindly follow the steps

    • @lishaczek1727
      @lishaczek1727 Před 2 lety +1

      @@RanjanBeginnersGuide tried, but it's okay now, I've put something next to the class in the html code, it is alright now

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před 2 lety

      @@lishaczek1727 I am glad

    • @lishaczek1727
      @lishaczek1727 Před 2 lety

      Well, that got fixed, but I can´t seem to find out the failure of my js… Got a week left I tried following your steps, but it doesn´t seem to work :/

  • @lestidhyah
    @lestidhyah Před 2 lety

    why i can't click my button?

  • @tajjammulhussain
    @tajjammulhussain Před 2 lety

    Thanks for this. Is there a way to contact you please?

    • @tajjammulhussain
      @tajjammulhussain Před 2 lety

      Sorry, I meant to ask for an email id to contact you. I have a few things i would like to discuss

  • @soumyaranjansahoo5199
    @soumyaranjansahoo5199 Před 7 měsíci

    why did u ignore tht % sign?

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před 7 měsíci

      Please check the pinned comment line

    • @soumyaranjansahoo5199
      @soumyaranjansahoo5199 Před 7 měsíci

      @@RanjanBeginnersGuide can u plz recommend me code for percentage ,i have tried everything nohing workdls

  • @dkaileyeditz303
    @dkaileyeditz303 Před 2 lety

    How can I convert this calculator into an app?

    • @RanjanBeginnersGuide
      @RanjanBeginnersGuide  Před 2 lety

      Many ways.. one of them is, you use heroku free hosting website and deploy

  • @katukurirajitha7594
    @katukurirajitha7594 Před rokem

    its not coming same designing