Wrote a simple javascript program.