How would i create a fps counter with javascript

I want to add a frames per second counter (fps counter) to my game so i can tell how many frames i get, but i do not know how to add a fps counter

Go through this wiki page.It will show you how to create an FPS counter using GUIText

http://wiki.unity3d.com/index.php?title=FramesPerSecond