GBB Logo         
GBB Services
GBB Services : Programming : Javascript Lab

Javascript Laboratory

INPUT

OUTPUT


Introduction

This is a simple javascript evaluator. You might want to turn on javascript for this page.

Things To Try

Here's some inputs to experiment with. To get one of them into the "Input" box, you can cut and paste it into the "input" text area, or you can just click on it. Press the "Process Input" button, to see the result in the "output" text area.

3*5
(1+4)*(1+9)
Math.pow(2,32)
resizeTo(800,580)
alert("hello world")
1+
2+
3
"pi is roughly " + Math.PI
"e is roughly " + Math.exp(1)
"the golden ratio is roughly " + 0.5*(1+Math.sqrt(5))
evenNumbers=""; first=1; last=50;
for(i=first;i<=last;++i)
{
   val = 2*i;
   evenNumbers += val + " ";
}
evenNumbers;
"the current time is " + Date()
location.href="http://www.gbbservices.com/"
document.bgColor="#FFFF00"
function factorial(n)
{
   retVal=1;
   for(i=1;i<=n;++i)
      retVal *= i;
   return retVal;
}
factorial(5);

Feedback

If you have corrections, additions, modifications, etc please let me know mailto:walterv@gbbservices.com

Back to top of page