Write a javascript program to make a simple calculator

Answer Posted / vinoth180

var a=20;
var b=11;
document.writeln("ADDITION:",a+b,"<br>");
document.writeln("SUB:",a-b,"<br>");
document.writeln("MUL:",a*b,"<br>");
document.writeln("MUL:",a%b,"<br>");

Is This Answer Correct ?    47 Yes 33 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we create session in javascript?

476


What is an empty html tag?

502


What web sites do you feel use javascript most effectively (i.e., Best-in-class examples)? The worst?

495


How do you sort an array in javascript?

522


What is the importance of javascript?

492






What are the javascript data types?

503


Enumerate the differences between Java and JavaScript?

694


Is javascript necessary?

467


What is ‘this’ keyword in JavaScript?

537


Explain what is javascript? List some data types supported by javascript?

474


What is the concept of “functions as objects” and how does this affect variable scope?

483


Is there an alternative to javascript?

476


Name some of the built-in methods and the values returned by them.

561


Explain prototypal/differential inheritance?

503


How can you get the reference of a caller function inside a function?

603