So is this more homework?
Relevance of JavaScript
It is not to be confused with JAVA.
It can do many of the seams thighs done with JAVA.
It is widely used to provide special features to HTML pages.
A common task is to provide a "rollover" effect, when the mouse is over an image, the image with change or "rollover" to invite the user to click on the image.
It is independent of the Operating system and the type of CPU.
You could just Google JavaScript purpose and find much more.
Oh sorry, you must not know how to do it.
Let me Google that for you.
http://lmgtfy.com/?q=JavaScript+purpose