JavaScript Runner

The large area works as a calculator. Corrections can be made without re-entering your numbers. If cookies are enabled, your work is saved automatically to the computer your working on.

If your developing JavaScript, it is a good idea to test it first in different browsers. You can do that by opening this page in each browser and putting the JavaScript into this page.

Please enable JavaScript for this page.

 JSRunner Bookmarket (Drag to Bookmarks Toolbar)

Symbol Description
+ Adds numeric operands or concatenates two or more strings in JavaScript.
- Subtracts numeric operands.
* Multiplies numeric operands.
/ Divides numeric operands.
% Returns the remainder when the first operand is divided by the second operand.
( ) Groups expressions, used to change the order of operations
Math.abs(x) Returns absolute value of x.
Math.acos(x) Returns arc cosine of x in radians.
Math.asin(x) Returns arc sine of x in radians.
Math.atan(x) Returns arc tan of x in radians.
Math.atan2(y, x)Counterclockwise angle between x axis and point (x,y).
Math.ceil(x) Returns the smallest integer greater than or equal to x. (round up).
Math.cos(x) Returns cosine of x, where x is in radians.
Math.exp(x) Returns ex
Math.floor(x) Returns the largest integer less than or equal to x. (round down)
Math.log(x) Returns the natural logarithm (base E) of x.
Math.max(a, b) Returns the larger of a and b.
Math.min(a, b) Returns the lesser of a and b.
Math.pow(x, y) Returns Xy
Math.random() Returns a pseudorandom number between 0 and 1.
Math.round(x) Rounds x up or down to the nearest integer. It rounds .5 up.
Math.sin(x) Returns the Sin of x, where x is in radians.
Math.sqrt(x) Returns the square root of x.
Math.tan(x) Returns the Tan of x, where x is in radians.

Variables

Variables can hold values or strings for later evaluation. Enter each formula separately. This example works from top to bottom.

FormulaResult
a=1+12
a2
a='1+1'1+1
a'1+1'
eval(a)2

 

Contact James Calfee

About Me

Deerfield Beach, FL, United States
No posts.
No posts.