Javascript Tutorial – how to make a basic calculator




just making a simple calculator in Javascript, hope you guys like it.
please like this video if you like it, or subscribe to my channel 馃榾

Original source


39 responses to “Javascript Tutorial – how to make a basic calculator”

  1. i just wanted to add why does this not work?
    <!DOCTYPE html>
    <html>
    <head>
    <title>My Caculator</title>
    </head>
    <body>
    <script>
    function setvalues(){
    var a,b, result;
    a = document.getElementById("a").value;
    b = document.getElementById("b").value;
    }
    function sum(){
    setvalues();
    result = a+b;
    alert("= "+result)
    }
    </script>
    <input id="a" type="text"/>
    <input id="b" type="text"/>
    <input type="button" onclick="sum()" value="sum">
    </body>
    </html>

  2. This was extremely informative. Very basic but you went over the details of the functions and how they are working in a manner that allowed me to actually learn from your work. Don't let anybody tell you their work is better, when you clearly understand what is happening from your work so well.

  3. With 34 lines of code including the button i made something that has the same power as that. And it tells you if it is Not a Number. And it prompts it. This is a nobie calculator. I also made t he better one in my dawn of javascript

Leave a Reply