This is a very nice JavaScript calculator program to demonstrate simple operations such as addition, multiplication and division. Although the source code can get quite confusing, it works.

Here is the screenshot of the calculator program and how it looks like in the web browser. You can further strengthen this script and format it as per the browser by using this JavaScript code to find browser information. It is difficult to understand the difference between JavaScript array [] and JavaScript object {}, so this tutorial explains this difference in between JavaScript object{} and array[] and gives practical examples to demonstrate both array and object concepts.

JavaScript Calculator