Q:

Is there any tool for commenting JavaScript code?

Is there any tool for javascript commenting as it is in c# like ghost doc.
/// <summary>
///   Method to calculate distance between two points
/// </summary>
/// <param name="pointA">First point</param>
/// <param name="pointB">Second point</param>
function calculatePointDistance(pointA, pointB)
 { 
    ... 
 }

there any tool to automatically add the comments like above.
like in c# code ghost doc did:
/// <summary>
///   Method to calculate distance between two points
/// </summary>
/// <param name="pointA">First point</param>
/// <param name="pointB">Second point</param>
private void calculatePointDistance(pointA, pointB)
{
  .....
}

i want to do the similar in Client side ,javascript

A:

Yes (but more like Javadoc) - look at JSDoc
Basically you use Javadoc-like special syntax in your comments e.g. @param like in the following example and then parser will generate good looking HTML output for you
/**
* Shape is an abstract base class. It is defined simply
* to have something to inherit from for geometric 
* subclasses
* @constructor
*/
function Shape(color){
    this.color = color;
}

