Javascript Tutorial - how to make a basic calculator

preview_player
Показать описание
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 :D
Рекомендации по теме
Комментарии
Автор

just wanted to say I saved this video about 9 years ago when I was starting. Im a software dev now. Thanks man

pwdotui
Автор

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.

jorsmith
Автор

Love it! The easiest way I've seen so far. Thank you! :)

marijatosic
Автор

this is a tremendous tutorial . great job and thank you God Bless.

oscarandresmedina
Автор

May God bless you broth and thanks for the video :)

drdrunk
Автор

hahaha bro i love your reaction 50 times 50 is 100 wt..f this is wrong. x//D thanks man. I love i learn some JS now :D

OsmarH
Автор

Thanx mate, great guide for a new student. cheeeers

alexanderjohansen
Автор

I am incredibly grateful to you sir :)

krimo
Автор

when i press the sum button - nothing happend....?

whats your opinion?

MrTomer
Автор

My thing is not doing any calculating here's my code.Please tell me what i messed up, or if i messed up anything. Also the multiply symbol is * and the division is /

<html>
<head>
<script type="text/javascript">
var a, b, result;
function setValues()
{

a =
b =
}
function sum()
{
setValues();
result = a+b;
alert("The sum is equal to"+result);
}
function rest()
{
setValues();
result = a-b;
alert("The rest is equal to"+result);
}
function multiply()
{
setValues();
result = a*b;
alert("The operation is equal to"+result);
}
function div()
{
setValues();
result = a/b;
alert("The operation is equal to"+result);
}
</script>

</head>
<body>
<div>
<input id="a" type="text/>
<input id="b" type="text/>
<input type="button" onclick="sum()" value="sum"/>
<input type="button" onclick="sum"()" value="rest"/>
<input type="button" onclick="sum()" value="multiply"/>
<input type="button> onclick="div()" value="sum"/>
</div>
</body>
</html>

gorb
Автор

Hello. What theme are you using here in Sublime Text???

vaclavgregor
Автор

how to show the result in a box instad of alert ??

imti
Автор

Hey! Liked your video, but could there be any way that it would work if you spelled the numbers(one, two, three, four)?

TheRccgsolidrock
Автор

i thought type attribute is no longer required in HTML5?

redps
Автор

how do you make the dang text stop deleting when you type

subtorandoslando
Автор

Any idea how to do this with only one function using if statements? 

MrQwerty
Автор

Hey how do i get to the page that he is on?

TastefulMedi
Автор

yeah goo java scrip coding ilike it much

malibwanyasebwa
Автор

Would this work on Apple macbook? I'm using a script editor that came with the computer, but the program in the video looks different from mine.

jeremiahbray
Автор

I don't get the reuslt. Can somebody help me?

GamerDaltone